Reputation: 2184
I use my own solution to localize my flutter app, and it works fine on Android. However, in iOS the app is always-english and does not change its language to the devices language. The System I use in my app is the following:
class MyLocalization {
MyLocalization(this.locale);
final Locale locale;
static MyLocalization of(BuildContext context) {
return Localizations.of<MyLocalization>(context, MyLocalization);
}
String get homeButton => _translation(const {
'en': 'english',
'de': 'Deutsch',
});
String _translation(Map<String, String> translations) {
return translations[locale.languageCode] ?? translations['en'] ?? "!!!MISSING TEXT!!!";
}
}
iOS ignores this. How can I fix this?
Upvotes: 0
Views: 2434
Reputation: 179
Open the link Appendix: Updating the iOS app bundle and scroll all the way to the end where you will find some setting that you need to do
Upvotes: 2