Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Changed Culture not working in shell content

XAMRXAMR USMember ✭✭

Hi

I made a settings page with a language chooser. It's working well, but the shell content the Tabbar, and the Menu items Title not changing. It's weird because other contents change well. If I exit and restart the app, the shell titles also changing well.
Did somebody face this problem before?

public void ChangeCulture(CultureInfo cultureInfo)
        {
            Thread.CurrentThread.CurrentCulture = cultureInfo;
            Thread.CurrentThread.CurrentUICulture = cultureInfo;
            Properties.Resources.Culture = cultureInfo;
        }

Posts

  • XAMRXAMR USMember ✭✭

    Tried PropertyChange too in Shell items, but not working.

    Then I made a simple refresh when changing the language

    for (int i = 0; i < Shell.Current.Items.Count; i++)
    {
         Shell.Current.Items[i] = Shell.Current.Items[i];
    }
    

    It's working, the bottom tab bar immediately changes the title texts, but the shell flyout navigation when I tapped the hamburger menu icon is empty. Only show the menu header picture, but the menu items disappeared. Any better idea?

  • XAMRXAMR USMember ✭✭

    Working now. The Shell items do not need to refresh, if Binding defined as OneWay, because the binding always defined as OneTime as default

Sign In or Register to comment.