"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

Absolutely, I can help you out!

What you’re seeing is a common issue that happens when two or more languages in your translation setup are using the same language code. In your case, it sounds like both Chinese Simplified and Chinese Traditional were assigned the same code—probably just zh, which caused the conflict. Translation platforms rely on unique codes to properly manage and export translations, so when two languages share the same code, the system gets confused and flags it as a problem.

To fix this without deleting either language, make sure each has a distinct and correct language code: use zh-CN for Chinese Simplified (used mainly in mainland China) and zh-TW for Chinese Traditional (used in Taiwan). These codes clearly distinguish the two variants, and most modern platforms support and recognize them correctly.

Once you assign the correct codes, the error should disappear, and you’ll be able to translate and export both versions without any issues. Let me know if you need help updating those codes in your project setup!