"Wrong export pattern" warning

Hello

Need your help! I have set up my project recently but I see my source files are highlighted in red and the following message is showing for them: “Wrong export pattern. Translations will not be exported for the languages that share the same language code”

I supposed it could be related to Chinese Simplified and Chinese Traditional ones ( shouldn’t they have the different codes?) thus I’ve deleted one of them and the message indeed disappeared. But we need translations for both languages. What should I do be to able to translate them and export the translations?

1 Like

Hello Alex,

Looks like that’s the common issue :slight_smile: I believe you have %two_letters_code% placeholder or something like that in your file export pattern and that’s the root cause as both Chinese languages will be exported with the same code - zh.

For our case, we simply charge the placeholder to %android_code% as we’re working on the app and that works great. You may want to try to use some other placeholder as well

Yes, you’re right %two_letters_code% when you have 2 Chinese languages. Most of our languages are required to be exported with %two_letters_code% so we decided to keep using the mentioned placeholder. As for Chinese we have set up “Languages mapping” for them, it allows you to customize the language code will will be used on export. As a result, Chinese are exported with different names

1 Like

Yes, you’re right %two_letters_code% is forbidden when you have 2 Chinese languages. Most of our languages are required to be exported with %two_letters_code% so we decided to keep using the mentioned placeholder. As for Chinese we have set up “Languages mapping” for them, it allows you to customize the language code will will be used on export. As a result, Chinese are exported with different names

@Torresinho @Olaf thanks you very much for the tips, that’s really helpful!!!

I’m seeing this error and I have only one Chinese language selected. It would be great if the error told me specifically which languages were in conflict. Currently I have Arabic, Chinese simplified, French, German, Italian, Japanese, Korean, Portuguese, Russian, and Spanish.

Hi @i-make-robots ! in the project, you have Chinese Simplified and Chinese Traditional. Fot the export pattern for your source file you specified %two_letters_code% which means that both languages will be exported with zh as a %two_language_code%

so on export one language will overwrite another and the system warns you about this

You may either change to %locale% for example or use the language mapping for one of the languages