Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Localization #21

Closed
fabmoll opened this issue Jan 1, 2014 · 6 comments
Closed

Localization #21

fabmoll opened this issue Jan 1, 2014 · 6 comments
Labels

Comments

@fabmoll
Copy link

fabmoll commented Jan 1, 2014

Hello,

With one of my apps I'm using English (USA) as default language and French (project properties). As you can see I'm using the general French localization and not fr-Fr or fr-BE.

So in my project I've one AppResources.resx file and another AppResources.fr.resx file.

Like that if a user uses my app with a french language (from Belgium or France) all my labels are in French and if the user uses another language (English, Italian,...) my labels are in English.

With the version 1.0 of RateMyApp the control displayed the correct translation (French or English) but since the version 1.1 it's always in English. As I can read it's because you're using the UI Culture and my app should support fr-FR and not only fr.

So what about French for Canada, French for Belgium,... Should I have one resx file for each and change my project properties to support all of them instead of the general one?

I think I missed something here and I hope you can help me.

Regards.

@ltomuta
Copy link
Contributor

ltomuta commented Jan 2, 2014

Hi Fabrice,

You are right, this is a change in PR1.1. Earlier we used for example the generic "fi" culture and now we are using "fi-FI", following the official Windows Phone documentation for supported languages. This was done because the app must use the same culture as the library supports (it does not work if app uses "fi-FI" and lib supports only "fi" or the other way around, as discovered in #10) and I considered that it is easier for both apps and lib to align themselves to that least rather than fighting over which culture to use.

I will have to investigate how the platforms handles fr-BE, a language not listed in http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202918(v=vs.105).aspx

Best regards,
Lucian

@ghost ghost assigned ltomuta Jan 2, 2014
@fabmoll
Copy link
Author

fabmoll commented Jan 2, 2014

Hi Lucian,

Thank you for the answer.

Please note that my phone uses fr-BE as Culture but my UI Culture is fr-FR like in the link you provided.

In fact I would like to use in my project properties the "French" language (fr) like that all kind of "fr" (Canada fr-CA, France fr-FR, Belgium fr-BE,...) can use my generic resource file (AppResources.fr.resx).

And it works for the moment. The only issue is that RateMyApp seems to not detect my UI Culture fr-Fr.

I think I gave you all the information needed. If you need something else please let me know (test, phone info.,...)

Regards,

Fabrice

@ltomuta
Copy link
Contributor

ltomuta commented Jan 2, 2014

Right, I checked now and indeed, for UI culture the only possible value is "fr-FR" which matches the "French" value for the "phone language" settings. It would make sense for that setting to be encoded as "fr" but for some reasons Microsoft chose to use the "fr-FR" variant.

There are several French-based options for Regional format but neither of them seem to match "fr-BE", at least not on my phone. What is the value you have set for regional format?

Regardless, the regional format should have no impact on UI strings, they all are expected to match the UI Culture so using "fr-FR" should give you always the French translation on WP. Try this, use "French (France)" in your project's localization settings.

@fabmoll
Copy link
Author

fabmoll commented Jan 2, 2014

My phone language is French, country is Belgium and Regional settings is French Belgium.

So UI culture is fr-Fr.

If I use French France in my project properties RateMyApp is localized in French. But VS created a specific resx file for French France - AppResources.fr-Fr.resx

With that my app is localized in English (default resx file) and my AppResources.fr.resx is ignored.

Do you want a sample project?

@ltomuta
Copy link
Contributor

ltomuta commented Jan 2, 2014

Just rename the AppResources.fr.resx file as AppResources.fr-Fr.resx and it will be loaded for all French-based cultures.

Lucian

Sent from my Nokia Lumia 920 powered by Windows Phone 8

@fabmoll
Copy link
Author

fabmoll commented Jan 3, 2014

Ok, added French-France in project properties, and renamed my resx file (AppResources.fr.resx file as AppResources.fr-Fr.resx) and now it works.

Tested english version, French France version and French Belgium version.

Thank you for your help!

Regards,

Fabrice

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants