How to generate internationalization files for non Flutter Dart apps

Viewed 50

I would like to know how to generate l18n files as in flutter gen-l10n for non Flutter apps. When I use the flutter solution it comes with Locale from dart:ui and also has the bindings to be used in a Flutter app, which makes it incompatible with a non Flutter Dart app. I need this solution to use on my backend server which is written in Dart to send notifications to the users.

1 Answers

Since there was no solution available for the problem I ended up creating a tool that enables me to do this. It is almost compatible with the current gen-l10n solution provided by Flutter but it can generate files for non Flutter applications as well. It also supports more complex ICU messages than the current Flutter provided solution. You can find it on pub.dev: https://pub.dev/packages/land.

Related