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

   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

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


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.