- The source
TSV
file should be namedlocalization.tsv
. - The source file should be in the same directory as
localization.dart
. - Open the terminal & navigate to the directory containing
localization.dart
. - Run the command
dart run localization.dart
- The output files should be inside the
lang
directory.
-
Ensure that the data follows the table format
slug en jp sp one one 一 uno two two 二 dos three three 三 tres -
Import the file as tab-separated values with the name
localization.tsv
file.
- Ensure that the file is named
localization.tsv
file follows the following format:- first row is the slug label followed by the languages
- the next rows are the localization keys followed by the translations with respect to the languages
slug en jp sp
one one 一 uno
two two 二 dos
three three 三 tres
- Old files will be replaced after running the command.
- The output files will be in
json
format. - JSON files are not "pretty-formatted".
- Flutter Translation Sheet - https://pub.dev/packages/flutter_translation_sheet