ashour / flutter_i18n_complete

A Flutter i18n demo for a PhraseApp tutorial
MIT License
1 stars 1 forks source link

Change the Language at Runtime #1

Open ghost opened 5 years ago

ghost commented 5 years ago

hey @ashour Really nice demo. I was really confused about how to do L10n with flutter but your blog article helped me so much over at: https://phraseapp.com/blog/posts/how-to-internationalize-a-flutter-app/ Thanks you..

I am curious about how to let the user set the language ?

Also in the IOS Simulator can find how to set it there ) got to be there somewhere ?

Would it be smart to use SHared Preferences to set it IF the user does this override. SO then at startup we check if there is a override and then set the Locale to that.

In terms of GUI, thinking it should be gotten to from a Side Drawer, and then open a Preferences Page.

ghost commented 5 years ago

Found it here: https://medium.com/saugo360/managing-locale-in-flutter-7693a9d4d6ac

DO you want to add it ?

muarifer commented 5 years ago

This tutorial use device's localization value.

You can change this behavior to value-based option (SharedPrefences etc..) like tutorial that you send.