You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we only have infrastructure to provide internationalized strings for things in the Material layer. We need to extend that infrastructure to also allow internationalized strings in the Cupertino layer.
This will be required to fix #13451 as one of the ModalRoutes lives in the Cupertino layer and will have to be translated there.
This is being worked on at this moment. If you found this bug via a cut/copy/paste crash bug, you can currently resolve this in your app by adding more localizationsDelegates to your Material or CupertinoApp for your supported locals.
In those delegates, point each required locale to a CupertinoLocalizations subclass that provides the needed strings.
Reacted by Raimund Wege, Nino Handler and Allan Ramos
Reacted by Saif Allah Khaled, Alexander Buder, Luiz Guilherme, Ibrahim Eid, Sylvain Losey, sebastiankutschbach, Ludwik Trammer, arkin, Harm Aarts, Lucas Betschart and 21 more
Reacted by Ludwik Trammer, arkin, Danial Nikbin, Fabricio Bayarri, Daniel Castro Fernández, Thomas Cordeu, Julio Seña, Nguyễn Hoàng Phúc, Sanasar Janjughazyan, Vicente Russo and 6 more
Reacted by Abdulhamid Abuzanunah and shaozhiyuan
Reacted by Daniel Castro Fernández, Julio Seña, Salvatore Rago, Sanasar Janjughazyan, Yura, gmiquilena1, Alban, Alex Ermashev, othnielt and Abdulhamid Abuzanunah
Reacted by Saif Allah Khaled, Julio Seña, Etienne Théodore, Sanasar Janjughazyan, Yura and Abdulhamid Abuzanunah
My CupertinoTimerPicker still gets error when using locale ('pt') and Cupertino delegate. If someone needs the complete mistake just say that post everything.
The following assertion was thrown building CupertinoTimerPicker(dirty, dependencies:
flutter: [_LocalizationsScope-[GlobalKey#e9e55], Directionality], state: _CupertinoTimerPickerState#b4279):
flutter: A non-null String must be provided to a Text widget.
flutter: 'package:flutter/src/widgets/text.dart': Failed assertion: line 241 pos 10: 'data != null'
Reacted by Mélanie Gravel, limeng-uuuqwr, Hillel Coren, Rafael Dal Bosco, Amr Abdelwahab, xster, Cardo, Karliwson (Kaká) Oliveira, Mike Ivanov, Andreigr0 and 10 more
Reacted by Juan Caicedo, jt535, Renato Mercado, noveleven and Mehmet Akif DERE
Its weird, my localization issue was solved since I have the GlobalCupertinoLocalizations.delegate, added, but in a TextFormField the copy and paste buttons do not show up on ios until there is at least one letter typed. The enableInteractiveSelection is also set to the default true. 🤔
This worked before we did localization.
Reacted by Joel Hernández, Ivan Saprykin, page and Mehmet Akif DERE
Wrap the widget with MetrialApp widget to use the default localization .
This way the time picker will have English localization .
But the problem is not solved waiting for the solution ...
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
szotp commentedon Nov 28, 2018
Uh... is milestone name correct, 2019?
xster commentedon Nov 28, 2018
Oops, wrong date
chunlea commentedon Dec 10, 2018
Before this issue fixed, we can follow #22624 (comment) use
to fix this.
It will force flutter to use the Android style text copy menu on iOS.
Looks like this in Chinese:
xster commentedon Dec 11, 2018
This is being worked on at this moment. If you found this bug via a cut/copy/paste crash bug, you can currently resolve this in your app by adding more
localizationsDelegatesto your Material or CupertinoApp for your supported locals.In those delegates, point each required locale to a
CupertinoLocalizationssubclass that provides the needed strings.41 remaining items
aBuder commentedon Jun 17, 2019
Is there an workaround possible
hpoul commentedon Jun 17, 2019
@aBuder might sound stupid, but did you add
GlobalCupertinoLocalizations.delegateto thelocalizationsDelegates? This solved the problems for me on dev channel. (It took me quite some time to figure that out, since it's missing from the https://flutter.dev/docs/development/accessibility-and-localization/internationalization exampleAdded cupertino localizations
Added cupertino localizations (#2804)
Added cupertino localizations (flutter#2804)
Enable i18n, as the cupertino i18n issue is resolved now
andersonmendesdev commentedon Jul 31, 2019
My CupertinoTimerPicker still gets error when using locale ('pt') and Cupertino delegate. If someone needs the complete mistake just say that post everything.
The following assertion was thrown building CupertinoTimerPicker(dirty, dependencies:
flutter: [_LocalizationsScope-[GlobalKey#e9e55], Directionality], state: _CupertinoTimerPickerState#b4279):
flutter: A non-null String must be provided to a Text widget.
flutter: 'package:flutter/src/widgets/text.dart': Failed assertion: line 241 pos 10: 'data != null'
lgfranco commentedon Jul 31, 2019
You probably forgot to add the delegates:
OR
andersonmendesdev commentedon Jul 31, 2019
Unfortunately I have it added.
uiboy commentedon Aug 2, 2019
Its weird, my localization issue was solved since I have the
GlobalCupertinoLocalizations.delegate,added, but in aTextFormFieldthe copy and paste buttons do not show up on ios until there is at least one letter typed. TheenableInteractiveSelectionis also set to the default true. 🤔This worked before we did localization.
riamehdi commentedon Sep 17, 2020
For me work fine, i make same code lake explain in link, juste ajuste for French context
reasje commentedon Apr 28, 2021
Wrap the widget with MetrialApp widget to use the default localization .
This way the time picker will have English localization .
But the problem is not solved waiting for the solution ...
github-actions commentedon Aug 2, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.