Localization not working correctly - Language shown

对着背影说爱祢 提交于 2020-01-14 04:21:28

问题


I have one 'issue' that is driving me crazy. I must be doing or not doing something.

Using C# a Universal project. I developed an App with support for 3 languages. English, Spanish and Polish.

I followed these steps:

  1. Created the folder "strings" with the different subfolders for each language "en", "es", "pl". And the resources.resw inside with the different texts.
  2. In the Manifest set up as default language "en".
  3. I checked that in the manifest I have the line Language="x-generate".

The thing is that when i Debug the application in my laptop or my Mobile (ARM) it runs correctly. (in visual studio i debug and it works)

The device is in English the app runs in English, the device is in Spanish the app runs in Spanish, etc.

But when i publish the Application in the Store and i install it in some device form the store it always runs in English.

I reviewed the devices where i install it from the Store, and English is not anywhere in the configuration.

Am i missing some step? do you know what can i review?

Thanks in advance, Kind regards,


回答1:


But when I publish the Application in the Store and I install it in some device form the store it always runs in English.

If you want to let your Application runs in Spanish or Polish for the properties which are pointing to the resources files, you will have two ways.

The first way is set the Spanish or Polish language as the default language in your device, so please make sure that the devices who have downloaded your app have installed the Spanish or Polish language package and have set the Spanish or Polish language as the default language, otherwise it will show your App in English.

The second way is to use the primaryLanguageOverride to change the Language which you want to show for your app, in this way you may meet the question about the language works in the Visual Studio but does not work when uploading to the store, for the detailed information about how to solve it, please check my reply in here: UWP: Resource file for languages is not deployed correctly .

Thanks.



来源:https://stackoverflow.com/questions/39064530/localization-not-working-correctly-language-shown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!