5

I've created a values-he folder with strings.xml file identical to the default strings.xml with translated string values, but running the app both on a Hebrew selected real device and on a Hebrew selected AVD still shows the default English texts. Any ideas why?

EDIT: this was answered - in some cases, Hebrew included, some android devices support deprecated language codes. For Hebrew the old 'iw' code is still supported on some devices instead of 'he'. This is known to be the case in some other languages.

  • 1
    you can find the solution here http://stackoverflow.com/questions/8393771/android-not-using-finding-my-hebrew-localization – Vladimir Mironov Jan 10 '13 at 21:20
  • 1
    And also [this](http://stackoverflow.com/questions/5074769/cyanogenmod-translate-a-project/8470980#8470980). – dmon Jan 10 '13 at 21:21
  • @dmon and vmironov, thank you both. Dmon, if you wan't to put this link as an answer, I'll accept it. I wonder why so many people put their answers in comments. Even if it is a link, I was looking for this and couldn't find. Showing me the link is a great answer... –  Jan 10 '13 at 21:26
  • Hmmm I think it's because, since it has already been asked/answered before, we shouldn't be taking points for it? Not sure. – dmon Jan 10 '13 at 21:32
  • but it is actually not our answers... we just googled it – Vladimir Mironov Jan 10 '13 at 21:33
  • Well, I googled it. Believe me. But didn't know the right words to use. you helped me find. Now if someone with the same problem happens to find my question and not the questions in your links, it may be helpful to give an accepted answer, even though he can look at the comments and see the link. The way I see it, it's not about who's answer it is, it's about providing the needed knowledge in the most clear and efficient way, and that you did... but as you think... –  Jan 10 '13 at 21:39

2 Answers2

8

From the Android Locale class it's said:

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. Also some devices use he for hebrews too so to be compatible with use both values-iw and values-he

K_Anas
  • 31,226
  • 9
  • 68
  • 81
  • 1
    "So use iw and not he" - I do not agree to that. Some devices use "he" and some use "iw" so it is best to use both if you wan't to support Hebrew. Other than that, thanks for the good answer, it's accepted. –  Jan 10 '13 at 22:06
  • @YekhezkelYovel sorry for this confusion yeah you are right i will edit my answer – K_Anas Jan 10 '13 at 22:08
  • Don't worry, but yes, please change it so if anyonw see it he will be given a good advice... –  Jan 10 '13 at 22:11
  • Even on recent 5.1.1 on Nexus 5, 'he' didn't work. So I had to add 'iw' too. I will keep both. – kalan nawarathne Jul 07 '15 at 08:42
0

Starting Summer 2021 Google now requires you to upload the bundle (.aab) instead of the .apk file. With that change, if your device does not support a specific language, it will not be downloaded from the Play Store.

Check the solution here.

Rufat Mirza
  • 1,425
  • 14
  • 20