Hebrew export for Android apps

Hello there,

By default, crowdin exports Hebrew to a folder/file with the two-letter code he, which usually is correct. However, Android apps use the deprecated iw for Hebrew and thus need special care. Currently you need to manually fix this by adding a language mapping and you usually only notice it either if you set your systems language to Hebrew and the translations don’t show up or you enable “all warnings as errors” in your build settings, which makes the compiler tell it to you. Below you can see the output from my build pipeline:

/home/runner/work/ShoppingList/ShoppingList/app/src/main/res/values-he: Error: The locale folder "he" should be called "iw" instead; see the java.util.Locale documentation [LocaleFolder]

   Explanation for issues of type "LocaleFolder":
   From the java.util.Locale documentation:
   "Note that Java uses several deprecated two-letter codes. The Hebrew ("he")
   language code is rewritten as "iw", Indonesian ("id") as "in", and Yiddish
   ("yi") as "ji". This rewriting happens even if you construct your own
   Locale object, not just for instances returned by the various lookup
   methods.

   Because of this, if you add your localized resources in for example
   values-he they will not be used, since the system will look for values-iw
   instead.

   To work around this, place your resources in a values folder using the
   deprecated language code instead.

   https://developer.android.com/reference/java/util/Locale.html

1 errors, 0 warnings

Thank you very much for your time.

Hi Abrynos,

The language mapping is set on the project level and works for all files. So you should add the language mapping just once during the project setup. There is no need to set it each time.

As a workaround, you can create a custom language with the code iw for Hebrew.

However, if I misunderstood you please feel free to correct me,

Yes. The problem was less about having to do it once for the project but about EVERY single android app developer having to do the same step each time they set up a project. I’m already using the custom language, but it is a workaround that has to be manually enabled. In my opinion (and this is the reason I posted here), this should be standard behaviour for android localization to hebrew (and the other languages affected by this).

Hi @Abrynos ! I’ll forward your suggestion to our development team for consideration in future updates. Currently, you may use the mentioned workaround of adding the custom language.

Thanks,

I absolutely agree with OP I had the exact same problem and it took me a while to find out that it’s because the standard mapping does not work for (some) Android systems.

@Olena @Tania Regarding the workaround: Can I somehow sync my custom language to the source language (in this case Hebrew)? Having to copy each translation and subsequent changes doesn’t feel like a valid workaround for me.

1 Like

Hello @flauschtrud

As a workaround, you can consider changing the export pattern. It is necessary to make sure that the translations of that custom language are pushed to where you have the source file. Just write so that the system exports to a specific folder, for example.

If you use integration (for example, GitHub), then you can configure it there. I cannot provide more information at the moment because I do not know exactly where and how you export files.

You can reach us by email (support@crowdin.com). Please make sure to attach the project ID and screen record (with voice comments) so we know all the details and can advise the best solution on the matter :slight_smile: