Localize UWP application

I have a resource file in the Strings folder and with subfolders for culture. See this image:

enter image description here

Also in appxmanifest I default to the value "en". But, unfortunately, the language does not change with the system language.

Did I miss something?

Repo link: https://github.com/NPadrutt/MoneyManager

EDIT: As suggested in the comments, adding this line of code to the OnLaunched Method in App.cs solved the problem:

        ApplicationLanguages.PrimaryLanguageOverride = GlobalizationPreferences.Languages[0];
+4
source share
2 answers

As suggested in the comments, adding this line of code to the OnLaunched Method in App.cs solved the problem:

    ApplicationLanguages.PrimaryLanguageOverride = GlobalizationPreferences.Languages[0];
+2
source

This is not tied to the OS system language (language pack), but rather to the user's preferred language:

  • Start

, Windows Shell ..

0

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


All Articles