1

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 ?

Lucas Britto
  • 355
  • 1
  • 8

1 Answers1

4

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,
  ],
);
boformer
  • 28,207
  • 10
  • 81
  • 66
  • https://flutter.io/docs/development/accessibility-and-localization/internationalization supportedLocales: [ const Locale('ko', 'KR') ] works for me, thanks – Suyon Won Jan 07 '19 at 05:24
  • woops it works for android only, so i had to add CustomLocalizations for iOS. https://stackoverflow.com/a/53752290/6228111 – Suyon Won Jan 07 '19 at 13:36