Skip to content

NavigationView Language #527

Closed Answered by sccombp
nevelate asked this question in Q&A
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

Comment options

You must be logged in to vote
0 replies
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