Skip to content

NavigationView Language #527

Answered by sccombp
nevelate asked this question in Q&A
Feb 27, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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.OnFrameworkInitialization…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nevelate
Comment options

Answer selected by nevelate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants