Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Organise .arb files in flutter using Flutter intl extension

Running Flutter Intl: Initialize generates lib/l10n/intl_en.arb. However due to many strings in my applications I would wish to have multiple arb files for same language.

To make it more clear, consider the following folder structure

 -->lib
    --> screens
        --> screen_a.dart
        --> screen_b.dart

Correspondingly I would have my l10n folder structure as follows:

--> l10n
   --> screen_a
       --> intl_en.dart
       --> intl_fr_FR.dart
   --> screen_b
       --> intl_en.dart
       --> intl_fr_FR.dart

How do I achieve this using flutter intl plugin?
Thanks in advance!

like image 235
Siva Jagadesh Avatar asked Nov 15 '22 01:11

Siva Jagadesh


1 Answers

Package Intl_translation can handle multiple arb source files since 0.17.5:

Allow multiple ARB files with the same locale and combine their translations.

like image 164
quambene Avatar answered Nov 23 '22 23:11

quambene