Are you translating country and language names?

By Edouard on April 26, 2011

One thing we often need when internationalizing software is translating country and language names. Translating this data manually is a pain, and a lot of work.

Many developers don’t know about CLDR, Unicode’s Common Locale Data Repository, which contains translation and information about pretty much everything a software could need. It contains translations for country names, language names, currencies, and many other things.

However, CLDR data is a bit difficult to consume in an app, because it is composed of large XML files containing a lot of different things.

Introducing locale_data

I just released locale_data, which was extracted out of Web Translate It.

locale_data is a collection of country and language names, translated into hundreds of languages, and stored into YAML files for easy consumption in apps. For instance, here’s the list of countries in German, or in Spanish.

The data itself comes from CLDR, and rake tasks are provided to update the translation files whenever a new version of CLDR comes out.

You can get locale_data for free on Github.