Merge localizable strings/translations spread across several CSV files into a single CSV file.
It can be used in combination with tools like strgen to
share translations between Android and iOS mobile apps. The CSV files
containing the translations can be kept in their own files and
managed with a system like Weblate. Once translated,
the files can be merged with csvloc
and then ran through strgen
to create native translations for Android and iOS.
poetry install
Imagine you have two CSV files for English and Finnish, containing string identifiers and the corresponding translations:
en-US.csv
:id,en-US someId,Some translation anotherId,Another translation
fi-FI.csv
:id,fi-FI someId,Joku käännös anotherId,Toinen käännös
Running csvloc en-US.csv fi-FI.csv
will produce a single
CSV file with all the translations merged:
id,en-US,fi-FI
someId,Some translation,Joku käännös
anotherId,Another translation,Toinen käännös