Forum Xamarin.Forms

Refresh Localization on culture change

RichardLawidjajaRichardLawidjaja USMember
edited August 2017 in Xamarin.Forms

Hi Guys , i am kinda stack in a problem

so right now my company wants to share the UI in a PCL project. We managed to do that. but right now i would like to ask your expertise
on how can i refresh the Translation on a button click

at this moment the resx files also going to be centralized and its located in PCL project any Idea?


  • N_BauaN_Baua INMember ✭✭✭✭✭

    If you are new to Xamarin Forms, localisation works really well.
    Read the following post.

    If you are aware of the above concepts, then calling the code (on Button Cllick or what ever) as under should work with no issues.

            public void SetLocale (CultureInfo ci)
                Thread.CurrentThread.CurrentCulture = ci;
                Thread.CurrentThread.CurrentUICulture = ci;

    Hope it helps.
    N Baua

  • MazidiMazidi Member ✭✭

    you can call setLocale method available in each platform projects from PCL using the interface ILocalize like this:

    CultureInfo ci=new CultureInfo("ar");
    AppResources.Culture = ci;
Sign In or Register to comment.