0

If the selected phone language isn't supported by an application it will fall back to the neutral language. How can this be detected in code? The CultureInfo.CurrentUICulture will always return the language selected in the phone settings.

4

1 回答 1

0

One way to achieve this goal could be to add a string to each resource file with the culture identifier of it. That is, add an entry to the resource file, for example with the name ResourceLanguage and the value (e.g. "en-US" if English etc.).

Then you can retrieve the value in your code:

var language = AppResources.ResourceLanguage;
于 2013-10-01T07:32:31.330 回答