Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seeking source for localized Countries, Languages and Region names

I seek a source for the world's main language names, country names, and territory names, localised into a long list of languages.

Example of localised names of languages:

 EN EN English
 EN ES Inglés
 ES EN Spanish
 ES ES Español

Example of localised names of a certain country in south-west Europe:

 ES ES España
 ES FR Espagne
 ES EN Spain

Any idea where can I take/build that from?

like image 205
Jordi P.S. Avatar asked Jan 04 '13 19:01

Jordi P.S.


1 Answers

You can find the information you are looking for in the Unicode Common Locale Data Repository (CLDR) here: http://cldr.unicode.org/

Data is supplied in XML so you will need to import this into your database.

The CLDR publishes human-readable charts for language names and territory (country, continent, etc.) names. In each, there is a section for each language or territory, identified by a standardised code. Then the rows of each section give a localised name, and codes for the languages which use that localised name to refer to the language or territory.

The underlying CLDR data is in XML form. The language and territory names you seek are in directory, repos/cldr/trunk/common/main/, with an XML file for each language, containing the names for various languages and territories localised into that language. For instance, the file es.xml has the Spanish-language names for languages ("español", "inglés") and countries ("España").

like image 191
Brendan Clavin Avatar answered Oct 16 '22 21:10

Brendan Clavin