Flutter: How to Change tooltip name of "paste" on textField to device's language
1,655
Add flutter_localizations to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
In your MaterialApp
:
return MaterialApp(
...
locale: const Locale('de'), // change to locale you want. not all locales are supported
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
);
Author by
Lucas Britto
Updated on December 06, 2022Comments
-
Lucas Britto over 1 year
When i go to copy or paste on textfield, the tooltip is always on english language, and my device is on Pt-Br. How can i change or fix that ?
-
Suyon Won over 5 yearsflutter.io/docs/development/accessibility-and-localization/… supportedLocales: [ const Locale('ko', 'KR') ] works for me, thanks
-
Suyon Won over 5 yearswoops it works for android only, so i had to add CustomLocalizations for iOS. stackoverflow.com/a/53752290/6228111