3

What's the locale for Bahasa / Indonesia and Tagalog / Philippines? Is it id_ID and tl_PH?

I saw that some sites mention in_ID but I believe "in" for locales is India.

chi11ax
  • 541
  • 1
  • 6
  • 17
  • 1
    `in` is in the [IANA database](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) as a deprecated alias of `id` which may explain why you've seen it. But as your answerer says, `id` is preferred/correct for Indonesian as it's ISO. – Tim Aug 16 '18 at 17:18
  • Thanks for the clarification @Tim That's helpful! – chi11ax Aug 19 '18 at 19:38

1 Answers1

5

The ISO 639-1 tag for Bahasa Indonesia is id. Strictly speaking, you don't need to add a country or region tag. However, if you insist on adding an ISO 3166 code, that would be ID, so the resulting tag would be id-ID.

I am not aware of a language tag in in ISO 639-1. IN is the country code for India.

The ISO 639-1 tag for Tagalog is tl. You can add the ISO 3166 code for the Philippines, PH, which would result in tl-PH.

For an official list of ISO 639 codes, see Codes for the Representation of Names of Languages at the Library of Congress (USA). For country codes, see the Online Browsing Platform for ISO 3166. For the current convention for using these types of codes, see IETF BCP 47: Tags for Identifying Languages.

Tsundoku
  • 2,455
  • 1
  • 19
  • 31
  • Thanks @christophe! – chi11ax Aug 16 '18 at 17:09
  • 1
    in JDK documentation i see the language tag as "in-ID" for Indonesia https://www.oracle.com/java/technologies/javase/jdk14-suported-locales.html#cldrlocale – resatz Sep 03 '20 at 14:11
  • @resatz That's an interesting point. The JDK locales don't always correspond to the ISO language tags. For example, Hebrew is `he` in ISO 639 but `iw-IL` in the JDK docs. – Tsundoku Sep 03 '20 at 14:17