Windows Runtime: How to get a list of preferred user languages?

Some WinRT type constructors accept IEnumerable<string> languages ​​to try and decide the language choice. For example, there is a Windows.Globalization.NumberFormatting.CurrencyFormatter constructor that uses a list of languages ​​to determine the choice of currency formatting language.

The only method I know for accessing a custom language is to build a Windows.Globalization.Language object and access the Id property . If the user has set a list of preferred languages, how can I get the complete list in the order of priority that they indicated?

+4
source share
1 answer

I think you need this property: GlobalizationPreferences.Languages . See the MSDN page in the GlobalizationPreferences class for more information.

+4
source

Source: https://habr.com/ru/post/1389847/


All Articles