Localization in Windows Universal Apps- Part 4


Pseudo Language

Pseudo Language is designed to test how well our app will look when it is. To test your app with Pseudo Language we have to enable it from Control Panel-> Clock, Language, and Region -> Language. Click Add a language. Pseudo Language is hidden, so we have to search for it In the search box, type qps-ploc. Select English (pseudo-qps) and click Add. And ensure that English (qps-ploc) is at the top of your preferred language list. Now you can test you app with Pseudo language

 

32

33

Accessing resources from code behind

 

Sometimes we may need to access the resources from code behind. We can do this with the help of ResourceManager class which resides in Windows.ApplicationModel.Resources.Core namespace.

 ResourceCandidate resource1 = ResourceManager.Current.MainResourceMap.GetValue
                                                           ("Resources/message/Foreground", ResourceContext.GetForCurrentView());
 string foreground = resource1.ValueAsString;

Tips and Best practices

  1. Make sure your app’s default language matches the language code for your default.resw file.
  2. Remove the resources for Pseudo Language before uploading the App to Store.
  3. . The Multilingual App Toolkit Customer Preview incorrectly used the target culture “zh-cht” for Chinese Traditional and “zh-chs” for Chinese Simplified. This has been corrected from previous releases.To correct this error, manually modify the .xlf files that contain the incorrect codes. Change “zh-cht” to “zh-hant” and “zh-chs” to “zh-hans”.

 

Sample program

Download the source code from here   Localization Demo and Multilingual App Toolkit Demo

Leave a comment

Your email address will not be published. Required fields are marked *