Closed ramin-deriv closed 3 years ago
After changing app locale using S.load(Locale('de', 'DE'));, the S.of(context).localeName still shows en.
S.load(Locale('de', 'DE'));
S.of(context).localeName
en
Even after setState and when rebuilding is done. It's not updated.
setState
Update: Also using Localization.localOf(context).languageCode returns en.
Localization.localOf(context).languageCode
Hi @raminvakili-fs If you want to get currently selected locale, you should do it with Intl.getCurrentLocale(). You can find this and other usage info in VS Code extension and Android Studio plugin docs.
Intl.getCurrentLocale()
After changing app locale using
S.load(Locale('de', 'DE'));
, theS.of(context).localeName
still showsen
.Even after
setState
and when rebuilding is done. It's not updated.Update: Also using
Localization.localOf(context).languageCode
returnsen
.