How to Localize Windows 8 (Store Apps) Applications from Czech to English with the Multilingual App Toolkit While Keeping Czech

This article describes working with Multilingual App Toolkit 3, which is no longer supported or developed. A guide to its successor, version 4, which is under active development, can be found here: 👻 There used to be data here. Now it is just an empty lot on the internet.

  1. Download and install MAT: https://developer.microsoft.com/en-us/windows
  2. Go to Control Panel > Clock, Language, and Region > Language and click to add languages. Search for qps-ploc and double-click the English (pseudo-qps) language. Make sure that this pseudo language is at the top:
    qps-ploc language

Steps 1) and 2) are the ones you only have to do once. Now you need to follow the steps that you repeat for every project.

  1. Create a new project; I named mine W8LocalizeTest :
    Create project W8LocalizeTest
  2. Leave the default language set to en-US in the Package.appxmanifest file (it is a good idea to use en-US so that if you only have Czech and English, for example, and your program reaches Germany, it will use English instead of Czech):
    Setting the default language
  3. Create a folder in the project root called Strings , inside it a folder en-US, and in that a file Resources.resw:
    Localization folder hierarchy
  4. Write into the file Resources.resw in the en-US folder these 3 entries:
    Resources-resw W8LocalizeTest
  5. Select the newly created project in Solution Explorer and choose from the top menu Tools > Enable Multilingual App Toolkit. A folder will be created called MultilingualResources containing the file Pseudo Language (Pseudo).xlf .
  6. Now it is time to write the XAML code, so put the following into MainPage.xaml inside the element:
    XML
    <StackPanel orientation="Vertical">
        < TextBlock TextBlock x:
    </StackPanel>
  7. Write the following into the C# code of the method OnNavigatedTo in MainPage.xaml.cs:
    C#
    var loader = new Windows.ApplicationModel.Resources.ResourceLoader();
  8. Choose Project > Add translations languages…. Select Czech here; qps-ploc should already be selected by default, and this option should not be possible to deselect:
  9. Choose Build > Rebuild Solution. The values you have in the Strings/en-US/Resources.resw file will then be transferred into the file *.xlf.
  10. Translate any values you like that are now in the Pseudo Language (Pseudo).xlf file by double-clicking it:
  11. In Control Panel > Clock, Language, and Region > Language, set any language except Czech as the default (it is at the top) and run the app; you will see text with size 100 and below it smaller text of standard size:
    image
  12. If you want to see that the program can also be displayed in Czech, keep only the Czech language (you can of course experiment as you see fit, but for me it was not enough to just set Czech as the default language; I had to remove all other languages including qps-ploc). The first text will now have a height of 50 and will be in Czech:
    image
  13. Done.
Categories

Leave a Reply