Arabic language files use ar_SA language code instead of ar_AR

Hi all, I seem to be stuck and cant figure out why crowdin is using “ar_SA” for an exported translation file instead of “ar_AR”. The language is set to just “Arabic”, as opposed to “Arabic, Saudi Arabia”. I believe it should be using ar_AR?

Appreciate any help

In case anyone ever finds this, I solved it with Integrations > Github > Branch Configuration > Language Mapping and mapped arabic to ar_AR / ar-AR. My understanding is this the correct code for “Arabic” so Im not sure why the workaround is needed but happy to have it sorted.

Hello there, here’s a list of codes that are used by Crowdin

In case you have added just Arabic language into the project, you should have on the export AR or AR-AR (in case of “locale” placeholder usage). If you received the AR-SA by default, most likely the language of target is Arabic SA.

Alternatively, maybe it’s something with your reporisoty configuration. Try adding those Arabic languages in a brand-new project, upload a test file from your laptop and use build+download just to see the result.

Thanks for your reply.

Unfortunately I dont have the ability to create another project on my account. But whats weird is that I tried removing all arabic languages on the project in question and then re-adding both “Arabic” and “Arabic, Saudi Arabia” separately but it still was using ar_SA for both. For example this PR on github that I closed New Crowdin updates by paperless-l10n · Pull Request #2322 · paperless-ngx/paperless-ngx · GitHub shows a commit New Crowdin updates by paperless-l10n · Pull Request #2322 · paperless-ngx/paperless-ngx · GitHub with “New translations… (Arabic)”, but it still is creating an ar_SA file, which I dont really understand. Thats even despite the fact that the file correctly contains target-language="ar"

File target language AR shouldn’t affect overall export. Probably you have the ar-SA as a target language in the project? Or have a customisation that replaces ar-AR into ar-SA?

I give +1 to @KateOlssenForum for you to create a test project and re-produce this. Maybe with trial account or so, if yours have a limitation.

Yea except I don’t! It really feels like this is a bug in my case, like crowdin just won’t ‘forget’ that language even after removing it as a target…

Hello @paperless-l10n

I don’t see any error logs related to your project, all language codes are fine. In case the code is hardcoded into the file itself, neither language mapping nor our system changes it.

I’ve provided your account with the possibility to create 1 additional project for test purposes. If you would be able to reproduce this issue in a new environment and provide me with a step-by-step record of this reproduction I would be able to confirm whether it’s an issue from our side or not.

Wish you all the best :slight_smile:

Hi, I’ve re-created the issue. I setup a new project and added my messages.xlf file, then I setup a ‘bundle’ “Test” similar to my real project where the output file is /src-ui/src/locale/messages.%locale_with_underscore%.xlf and now when I download that bundle I get messages.ar_SA.xlf

Annoyingly this will only let me put one screenshot in my post, this is probably the most relevant one:

1 Like

Hello, @paperless-l10n thanks for your assistance! Going to review everything from my side.

For now, if this solved the issue, please use language mapping.