Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 389
Henley Avatar asked Nov 09 '22 15:11

Henley


1 Answers

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.

like image 155
DaSourcerer Avatar answered Nov 26 '22 06:11

DaSourcerer