Monday, 02 December 2019 09:45

Yo!AvatAR – Chinese Version

Written by https://cxlabs.sap.com/2019/12/03/yoavatar-chinese-version/
Rate this item
(0 votes)

Aiming to support Global Customer Operations (GCO) to engage with customers, SAP Labs China Experience Center is a showroom in SAP Labs China in Shanghai. In 2019, the showroom has been visited

by 1659 visitors from government, customer/partner, global executive and university. In early November, it has reopened with some new, carefully selected showcases, one of which is Yo!AvatAR!

In order to make Yo!AvatAR more friendly to local visitors, we localized the language and price tags of Yo!AvatAR with the help of Lars. See the screenshots below:

Accurately, this is not only a Chinese version, but also a multi-language version of Yo!Avatar, as the language of Yo!AvatAR now depends on the device language settings. It only supports English and Chinese for the time being, but we could easily make Yo!Avatar support other languages.

Let me show you how I made it happen.

Adding multi-language support to an Xcode project

1. Navigate to ProjectInfoLocalizations in Xcode

2. Click + to select the language which you want to support

3. Click Finish in the pop-up box.

4. Create a new String File named Localizable in the main path.

5. Select the new String File and click Localize

6. Select English and click Localize

7. Check the language you need.

8. Then the String file will become a folder and a new string file created for the language you select automatically.

9. Add the language with key-value form like this:

10. Replace all character in project with this function:
” NSLocalizedString(key, comment: “”); “

userName.text = NSLocalizedString("please login", comment: "");

11. Done.

iOS will check the device language and replace the value from String files automatically. When you chose English, the value come from Localiable.strings(English), so as Chinese. So if you want, you can add other language follow the step before, what you need to do is to switch the key-value in the new String File.

Read 9 times

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.