Reputation: 502
What spoken languages does browser support? Is there a list some where?
This may not be the best approach, but I am think that if I use:
$_SERVER('HTTP_ACCEPT_LANGUAGE');
To get the language that the browser is set to, then I can let the page content be created by data from the database.
The thing I need to know is what does $_SERVER('HTTP_ACCEPT_LANGUAGE') actually return, in the form of languages. Is there a list some where?
Upvotes: 0
Views: 202
Reputation: 547
HTTP Language codes are based on RFC 4646, and a somewhat dated list has been published here - it covers quite a few languages, so maybe it is enough for your immediate needs. Language codes are based on ISO 639-1 language codes and ISO 3166-1 country codes, both of which are subject to change. Any list that you build up will be outdated as soon as one of these two standards is modified.
A more detailed explanation of language codes can be found at mozilla.
Upvotes: 1