Using locale or two letter code based on project
I have a project in Crowdin that's being translated into French (fr), Spanish Mexico (es-MX), and Spanish Spain (es-ES). I'm running into an issue where if I defined my configuration to use %locale% the translations for French have fr-FR in the name (which causes C# to fallback if the locale is fr-CA for example) but if I use %two_letters_code% I only get files with es in the name. If I manually download the files they have the correct codes (fr, es-MX, and es-ES).
Is there anyway to setup my configuration so my files download using either the two letter code or the full locale based on the project?
Hi @amura11 Yes, you can use Languages mapping.
I think something like this should help you:
files:
-
source: [...]
translation: [...]
languages_mapping:
locale:
# crowdin_language_code: local_name
fr: fr
Thanks for the idea, I was wondering if that would work. Unfortunately that isn't ideal; every time a new language is added I have to go through each config file and make sure it's up to date. When I manually download the files from Crowdin they already have the correct locales/language codes, is there anyway to preserve that? If there isn't I might as well just go back to doing things manually.