Do You Speak A-My Language?!

Greg Perry
12 min readOct 25, 2019

Supply Translations to your Flutter app.

When it comes to “Internation-­alizing” your Flutter app, there’s a few things you have to set up first before you can proceed as it’s stated in the documentation, Setting up an internationalized app:

“To add support for other languages, an application must…include a separate package called flutter_localizations.… If you want your app to work smoothly on iOS then you have to add the package ‘flutter_cupertino_localizations’”

Setting up an internationalized app

With that, you can then import the flutter_localizations library. Next, you must specify the ‘localizationsDelegates’ and ‘supportedLocales’ to the widget, MaterialApp. Each delegate encapsulates a collection of localized values or, with regards to this article, text translations.

Setting up an internationalized app

Flutter has a process to provide such translations (localization strings), but I preferred Thomas Ecalle’s own library, FlappyTranslator, as it too provided a means to display native text strings and their translated text strings in a Flutter app. His work inspired me to create the library package, I10n_Translator. One particular characteristic that I liked and blatantly adapted from his library to use in my own…

--

--