The purpose of this gem is to simply provide city translations.
If you're doing anything with city names and translations, there's no need to reinvent the wheel and add your own translations. Just use this gem's city translations and skip the hassle of having to add and manage each city translation for each locale.
Locales we will include are specified by ISO 639-1 alpha2, http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
City codes used are those specified in UN/Locode, http://www.unece.org/cefact/locode/service/location.html
Add to your Gemfile:
gem 'i18n-city-translations'
I18n.t(:DEBER, :scope => :cities)
or
t(:DEBER, :scope => :cities)
The locales were generated using this rake task which you might find useful somehow:
IMPORT_LOCALE=en rake import:city_import
IMPORT_LOCALE=en rake import:city_translation
It will generate a new yml file that contains the all cities from the export of UN/LoCode for the locale specified. Please note that some of the country translations may still be missing.
- Denny Mueller - https://github.com/dennym
https://github.com/svenfuchs/rails-i18n https://github.com/svenfuchs/i18n
- 0.0.1 - Initial just generated locale and mixed translations
MIT or GPL
https://github.com/svenfuchs/rails-i18n https://github.com/onomojo/i18n-country-translations