Henley Wing Chiu
Henley Wing Chiu

Reputation: 22535

What ISO code does the Accept-Language HTTP Header use?

What ISO code is used in the language section of the Accept-Language header (ie es for Spanish, de for German and en for English)

Is it ISO 639-1?

Upvotes: 7

Views: 4873

Answers (1)

DaSourcerer
DaSourcerer

Reputation: 6606

Is it ISO 639-1?

One could think that. And indeed, the format draws (among others) from ISO 639-1 and 639-3. To make this short: The Accept-Language header is under authority of RFC 7231, section 5.3.5. The list of therein allowed language tags is referring to RFC 5646 which is in turn pointing to the IANA Language Subtag Registry. To my knowledge, this format does not directly map to any ISO code at all. See also: Wikipedia: IETF Language Tag - Relation to other standards.

Upvotes: 3

Related Questions