Jesway / flutter_translate

Flutter Translate is a fully featured localization / internationalization (i18n) library for Flutter.
MIT License
401 stars 118 forks source link

Localization Issue with OS language changes #94

Closed MaxiStefan closed 1 year ago

MaxiStefan commented 2 years ago

Hi,

Tested this plugin primarily for the cool nested JSON feature, however, I found a problem when the user tries to change the language from the OS settings.

I am calling LocalizedApp.of(context).delegate.currentLocale.languageCode on

@override void didChangeAppLifecycleState(AppLifecycleState state)

to listen to the scenario described above and the localizationDelegate does not seem to be changed. It has the same language code even if in the OS the language has been changed.

Any ideas? Thanks

bratan commented 1 year ago

Hi @MaxiStefan, currently this functionality is not implemented in flutter_translate.

There is a previous issue https://github.com/Jesway/Flutter-Translate/issues/21 regarding this. I don't have time currently to implement or test this functionality, but there is an example there which you can try.