43

I need to localize my app into Indonesian language. My app's resource folder contains a list of "values" subfolders for each language, for instance "values-fr" folder.

But I read confusing information on Android developer 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.

How to understand this? Basically, should I name my folder "values-in" or "values-id" so that it correctly displays Indonesian texts on a device with Indonesian locale?

gpo
  • 3,388
  • 3
  • 31
  • 53
  • 2
    I think they mean that you can't base it off of ISO 639-1 (in this case that would be `id`), and you have to use `in` instead. – dmon Nov 08 '12 at 15:06

1 Answers1

58

Resource folders for Indonesian language on Android should be named:

  • raw-in
  • values-in
gpo
  • 3,388
  • 3
  • 31
  • 53
  • 4
    is this a bug in android? the default folder created by android studio is values-id – lxknvlk Jan 07 '17 at 14:36
  • 1
    `in` is the old language code for Indonesia and it seems to have been updated - `id` should be the new one – konakid Dec 07 '17 at 20:26
  • 1
    @lxknvlk Android Studio 3.2 creates values-in – AppiDevo May 18 '18 at 20:00
  • 1
    @konakid So both `in` and `id` are needed now? – DYS Jun 20 '18 at 05:52
  • 2
    @DYS, because Android uses the outdated codes. If you use `id`, it won't recognize it. – karl Aug 20 '18 at 21:57
  • 2
    `id` is not the right one, `in` is. My app doesnt pick up Indonesian strings if I set my device to Indonesian language with `id` but it does with `in`. – Ali Kazi Aug 23 '18 at 06:25
  • 2
    Is there an official reference that dictates starting from which OS version and API level, Android started to recognize `values-id`? – DYS Sep 09 '19 at 03:25