1

Can't get what ISO standards are actual nowadays for locales and languages. Where i can find such info?

I want to standardize languages and locales in my project.

I found the 639 standard for languages, but it is said that it is obsolete. Should I use 639-1 then? Should I use ISO 3166-2 for country codes then, to make locales by myself?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
avasin
  • 9,186
  • 18
  • 80
  • 127

2 Answers2

1

ISO 639 is the way to go for language codes: it is a 'superset' of standards for language codes with different lengths. Two-letter language codes, for example, can be found in ISO 639-1. You will have to decide if ISO 639-1 covers all languages that you need or not: if not, switch to ISO 639-2 or 639-3 (although even ISO 639-3 does not cover all languages in the world yet).

The 'obsolete' info that you saw most likely refers to the list that is kept on the w3c website: language codes do change from time to time.

See also this question for a more detailed answer - although I do not agree with all details given there.

To build your locale just combine language and country code (from ISO 3166), as you suggested. Two letter codes are more common than three letter codes: use them if they support all locales that you need.

Community
  • 1
  • 1
Jenszcz
  • 547
  • 3
  • 9
0

The most authoritative guidance on this topic is IETF BCP 47, which recommends that you use the shortest code that is available for a language. So if both a two-letter code (ISO 639-1) and a three-letter code (ISO 639-2) are available, IETF BCP 47 recommends that you use the two-letter code.

Tsundoku
  • 2,455
  • 1
  • 19
  • 31