Change language on the fly Xamarin forms

WerckAyrtonWerckAyrton FRUniversity ✭✭
edited October 2016 in Xamarin University

Hi,

I developed an app where I need to change the language on the fly.
For the moment I followed the tutorial on xamarin and the translations works fine (I use resx files).

I have search around but I did not found any information on how to change language on the fly :(.

Best Answer

Answers

  • rene_ruppertrene_ruppert DEXamarin Team, University, XamUProfessors Xamurai

    Not sure what you meany by "changing on the fly"? You cannot change a device's preferred language. If you look at our documentation, it uses an interface and platform specific APIs to find out the current language (https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/#Displaying_the_Correct_Language). If you return something else than the preferred language, then the corresponding data from the RESX file will be used instead.

  • WerckAyrtonWerckAyrton FRUniversity ✭✭

    By "on the fly" I mean that you change the language of the appplication (not the device), inside the app using a menu in the application.
    For example if the device is in english and my user is japanese he may be able to change the language of the app IN the app by moving to the settings menu of my application and selecting the japanase language.

Sign In or Register to comment.