0

I'm trying to use the flutter_intl plugin for Android Studio with an add-to-app Flutter app I'm developing on Android (by which I mean the Flutter app exists within an Android app, in its own sub-directory, and the Android Studio project includes all the Android code as well.) The issue is when I initialise flutter_intl it creates the l10n folder at the base of the Android directory, not further down the tree where Flutter's lib folder actually is. Is it possible to specify in flutter_intl where the l10n folder should be, rather than it being automatically generated within a new lib folder at the root?

mosh.jinton
  • 188
  • 11

1 Answers1

0

Just create an l10n.yaml file at the root directory and put this in the file:

arb-dir: lib/l10n
output-dir: l10n

Change the directory according to your needs.

change arb-dir for translations files directory and output-dir for output files.

Run flutter gen-l10n --help command, parameters listed can be used in l10n.yaml file

see also: https://stackoverflow.com/a/71401194/8807231

Alaindeseine
  • 3,260
  • 1
  • 11
  • 21
  • 1
    thanks, but will this change the place Flutter Intl initialises files and treats as the location to add extracted strings and locales that I add? It doesn't seem to be affecting how that plugin itself works – mosh.jinton Aug 16 '22 at 14:55