-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/engine
#17473Closed
Copy link
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)customer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-iosiOS applications specificallyiOS applications specifically
Milestone
Description
Hello!
Still have the error with localization for Flutter iOS application (for Android everything works fine).
My code for App widget:
...
@override
Widget build(BuildContext context) {
_initGlobalConstants();
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
_bloc.dispatch(AppEventStarted());
return MaterialApp(
supportedLocales: [
Locale('en', 'US'),
Locale('ru', 'RU')
],
localizationsDelegates: [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate
],
localeResolutionCallback: (locale, supportedLocales) {
for (var supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale.languageCode) {
return supportedLocale;
}
}
return supportedLocales.first;
}
...
The point is that when I try to launch it with some breakpoints, everything works good and locale is not null. But when I try the same without any breakpoints, I have error inside localeResolutionCallback - The getter 'languageCode' was called on null. Tried several times some tips about this issue for iOS:
- Added
<key>CFBundleLocalizations</key>
<array>
<string>English</string>
<string>ru</string>
</array>
...
for Info.plst
2) Added locales support for iOS project.
But nothing helped.
Don't know what to do. Localization is very important, I thing, but it's so ugly for Flutter now.
onatcipli, mtx62, Mo92, jvinall, tsinis and 16 more
Metadata
Metadata
Assignees
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)customer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-iosiOS applications specificallyiOS applications specifically