-
I have NavigationView and my system language is Russian. NavigationView Settings and all tooltips are russian now. How I can change app language? |
Beta Was this translation helpful? Give feedback.
Answered by
sccombp
Feb 28, 2024
Replies: 1 comment 1 reply
-
If you just need to change the language for the application you can set the culture for the current thread (by default it is set to your system language). You can do this in your App.axaml.cs file. public override void OnFrameworkInitializationCompleted()
{
CultureInfo ci = new CultureInfo("uk-UA");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow
{
DataContext = new MainWindowViewModel(),
};
}
base.OnFrameworkInitializationCompleted();
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nevelate
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you just need to change the language for the application you can set the culture for the current thread (by default it is set to your system language). You can do this in your App.axaml.cs file.