navigator.language list of all languages



Where i can see the list of languages and their codes?

I want to compare languages and auto-select required language in template.

Are they cross-browser equal?

Any other solution?

Answer

This list of languages is defined by the ISO : http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Example : be for belarus, fr for french.

If you are looking for something more specific, those are not languages, but locale, e.g. “Brazilian Portuguese”, or “Canadian French”. Those can be found in the ICU project: https://www.localeplanet.com/icu/

Example : pt_BR for Portuguese (Brazil) vs pt_CV for Portuguese (Cape Verde)

Those are the ones available for copy/pasting in dYale answer.



Source: stackoverflow