I have a UWP application.
And I need to change the language on the fly, so I have this for changing the language:
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = language.FourDigitCode;
ResourceContext.GetForViewIndependentUse().Reset();
ResourceContext.GetForCurrentView();
But there is a problem that the language of the system functions does not switch (only after restarting the application), how can I fix it?
Here is an example:

Now I have run this code:
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "lv-LV";
ResourceContext.GetForViewIndependentUse().Reset();
ResourceContext.GetForCurrentView();
The user interface is localized, but system functions still remain inactive:

But when I restart the application, everything is fine:

Any ideas how I can fix this?
source
share