CLI: Android language/region codes


When using Transifex CLI to get translations for an Android project, we currently use <lang> in the directory name, so that translations are put into their right folders (like deapp/src/main/res/values-de/strings.xml).

However, language subtags/region codes have another syntax in Android. For instance, de_AT should go to app/src/main/res/values-de-rAT/strings.xml (and not to …/values-de_AT/…). See App resources overview  |  Android Developers, Table 2. Configuration qualifier names, Language and region.

So I suggest to create a new CLI variable <android-lang> that can be used in paths instead of <lang> and that contains the correct value for Android like this:

<lang> = de_AT → <android-lang> = de-rAT


Thank you for contacting Transifex support and submitting your request.
Regarding your query, It seems that this could be achieve through language mapping parameter.
For example:
Lets say that our language code is “tr_TR” but this doesn’t work for you and you wish to change it to “tr-TR” in order to achieve this the configuration will be: (This could be apply to all project or by project)
host =
lang_map = tr_TR: tr-TR

file_filter = locale//english-8_families_msgstr_arabicpo_en.po
source_file = locale/english-8_families_msgstr_arabicpo_en.po
source_lang = en
type = PO

Here you could find more information, Give it a try and let me know if this works for you.

Best Regards


Thanks for your reply. This is how I currently do it and it’s working.

My enhancement suggestion is to implement a new variable <android-lang> so that CLI users don’t have to configure each language with regions manually.


Got it!, We really appreciate your input, since this is the best way to help us improve Transifex and we hope that you will keep on enjoying the whole translating experience.

I have already forwarded everything you pointed out to the relevant team and they will review your suggestions, but please keep in mind that implementing new features or applying any changes might take some time.

Please, feel free to contact us with any further feedback or questions you might have!

Kind regards,

1 Like