Member-only story
Internationalizing Flutter Apps Is Hard Unless You Use My Way
Google is not telling you the easiest way to do internalization and localization. And they make you do it the hardest way in the docs. Let me show you an easier way.
Even the top two Google IO presenters think It’s too hard and do not use it in their Flutter demo apps; namely, Very Good Ventures and GSkinner.
Now let’s go through the multiple internationalizing tools in the Flutter SDK and find an easier way to internationalizing the flutter app.
Why The Gen l10n Internationalizing Way Sucks
The first internationalizing tool the Flutter SDK team came up with is the gen-l19n tool. But, there are some problems with it.
The whole reason why there is a l10n YAML file configuration is that it is run each time in the build process, as the AppLocalizations Class generated to use is in fact put in the dot-dart-tool folder, which in fact is git-ignored. And if we have a big file than that will cost some build time which does not make sense as we pay CI build service bills in minutes not hours.
The second problem is that we cannot easily use plurals, gender, etc. Now, on to the intl tools that the Flutter SDK team came up with to use beyond the gen-l10n tool.