Locale key in the root of YAML doesn't match the filename

We have a Ruby-on-Rails project that has an en.yml file with our source strings in English. It looks like this:

en:
  foo: "bar"

Our crowdin.yml uses %two_letters_code%.yml to remap the translation filename. We translate to Spanish for Latin America, which is es-419 as a locale. When we export the translations using the CLI tool we get the es.yml file we expect, but the root key in the YAML is es-419.

Our es.yaml file looks like this:

es-419:
  foo: "bar"

Does any know how to get that es-419 to be es?

Hello @matthew.denner

2 letters code, or locale, are used only for patterns naming, like path, to change name of folder/file and so on, they doesn’t affect the root keys inside the file you get.

You can give a try to Language mapping, assign Spanish (es) to other combination, so (es) becomes free and ca be assigned to Spanish Latin America, but I’m no sure it would help with language code inside the file.

Probably the best solution would be switching to Spanish (es), or change the root key inside the file after you download translation (I suppose it should be possible to create the bot for this action).

Thanks. We had tried using the override behaviour on the account but that didn’t appear to have any impact. In the end we’ve gone for fixing it up after downloading, like you suggest.

I also have some 3rd party app that changes language code inside the file after downloading from Crowdin, so 1 Spanish becomes 6 different versions :slight_smile: