Cupertino Translation on Flutter
NOTE: This article is written at the time Flutter 1.9.1-hotfix is the recent stable version
Working on flutter been great for me. This also marks my first time working on iOS app development natively. But I found a problem when working on localization with Cupertino’s tooltip like this:

This happened when I set the device language to Bahasa (Indonesian) or anything aside default English then I tried to tap and hold on textField to bring up tooltip with Copy and Paste menu.
Searching on Github gave me to this issues (which still opened when I wrote this) :
Oh well, I could not do much and users are most likely trying to bring up that very tooltip on that screen. So I followed the advice from the issue and created my Cupertino translation for Bahasa.
I found Cupertino default localization for English from flutter (highlighted if you clicked from the link below:
Basically these are what I did when I need Cupertino tooltip in Bahasa :
- I created new file → new class called
CupertinoId
based onDefaultCupertinoLocalizations
, then translate everything to Bahasa - then created new
_CupertinoLocalizationsDelegate
on the very same file. Replace the language code withid
inside this class.
@overridebool isSupported(Locale locale) => locale.languageCode == 'id';
@overrideString toString() => 'CupertinoId.delegate(id_ID)';
- Still on
_CupertinoLocalizationsDelegate
, we want to loadCupertinoId
created on first step when Bahasa is currently used on device locale
@overrideFuture<CupertinoLocalizations> load(Locale locale) =>CupertinoId.load(locale);
- Add localization references and supported locales into main
MaterialApp
, usually located inapp.dart
MaterialApp(...localizationsDelegates: [ CupertinoId.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate,],
supportedLocales: [const Locale('id', 'ID'),const Locale('en', 'US'),],...)
- Don’t forget to add
id
language support on iOSInfo.plist
file
<dict>... <key>CFBundleLocalizations</key> <array> <string>en</string> <string>id</string> </array>...</dict>

and you are set! 🍻
To create for another language, just repeat those steps with corresponding language ID and translation. Reminder that this just a quick fix (I’m not sure if this is the right way) until Flutter implement Cupertino translation.
This tooltip will refer to your device locale, should not be affected with selected app locale unless you made it so.
Thanks!