Search code examples
javascriptlistculturewps

RFC4646 culture codes for javascript


Is there a comprehensive list of all or most used (e.g. on the websites in www) culture codes regarding to RFC4646 that is already written in a machine readable format (better: JSON)?

Example:

{ codes: [
  { code: 'en-US', name: 'English - United States'},
  { code: 'en-CA', name: 'English - Canada'},
  { code: 'de-DE', name: 'German - Germany'},
  ...
]}

I want to know if there is a preferred list of country codes usually used in e.g. GUIs to select localization of the data represented. I have to give the user of my client the possibility to choose a country code that suits best for its needs. I will use the list for form values of an OpenSource client for accessing WPS (Web Processing Service) servers. WPS uses the selected language for localization of its output data. Since WPS is generic as well as the client, there is no context information that allows me to choose a language for the user: The user alone must finally choose a language.


Solution

  • http://msdn.microsoft.com/en-us/library/ms533052%28v=vs.85%29.aspx

    you could parse the first and third column