Reputation: 8068
I'm detecting user accepted languages through $_SERVER['HTTP_ACCEPT_LANGUAGE']
and I'm getting strange language and country codes.
Language codes I've found:
es-419
es-es_tradnl
*
I've checked some code language listings and haven't found these codes:
I understand that es-es_tradnl means Spanish traditional, but any clue about es-419 nor '*'...
Any clues about where does that codes come from?
Edit, question extended:
Where can I find a full list of language codes?
Upvotes: 2
Views: 3618
Reputation: 4856
Actually, I would like to point you directly at the resource. If you go here (link below) you will find both those cryptic looking language codes.
http://msdn.microsoft.com/en-us/library/cc233968.aspx
I hope this helps, since the others did not have the link handy for you, I thought I would add it. There is a list of 449 language codes (which is just a language code and country/region code combined).
That list is updated a few times a year, check the parent page of the listing I gave you if you want to see the update history. Hope this helps.
Upvotes: 1
Reputation: 42045
The name space of language subtags is administered by the IANA (see http://www.iana.org/assignments/language-subtag-registry).
Upvotes: 3
Reputation: 78731
HTTP/1.1: Header Field Definitions:
The special range "*", if present in the Accept-Language field, matches every tag not matched by any other range present in the Accept-Language field.
As I already mentioned in the comments, es-419
stands for
Spanish appropriate for the Latin America and Caribbean region, using the UN region code
from Wikipedia
Upvotes: 2