Git Product home page Git Product logo

i18n-country-translations's Introduction

I18nCountryTranslations

The purpose of this gem is to simply provide country translations. The gem is intended to be easy to combine with other gems that require i18n country translations so we can have common i18n country translation gem.

If you’re doing anything with country names and translations, there’s no need to reinvent the wheel and add your own translations. Just use this gem’s country translations and skip the hassle of having to add and manage each country translation for each locale.

Supported Locales

There are translations for almost all locales. The list of available locales is too big to be useful. If you’re wondering if a specific locale is here, more than likely it is.

Installation

Add to your Gemfile:

gem 'i18n-country-translations'

Usage

I18n.t(:US, :scope => :countries)

or

t(:US, :scope => :countries)

Contributing

Most locale translations already exist but if you find an error or we’re missing something, please submit a pull request.

Most of the locales were generated using this rake task which you might find useful somehow:

IMPORT_LOCALE=en rake import:country_translation

It will generate a new yml file that contains the country translations for the locale specified. Please note that some of the country translations may still be missing.

You can also use these standard translations to help if you don’t want to use the script above: unicode.org/repos/cldr-tmp/trunk/diff/summary/root.html

Contributors

You may also be intersted in the i18n_country_select gem which basically gives you a helper to make use of these translations in a coutry select dropdown. github.com/onomojo/i18n_country_select

If you need to use timezones, we also created a convenient way to translate the default Rails timezones with the gem i18n-timezones github.com/onomojo/i18n-timezones

Version History

1.0.1 - Fixing bad version in Gemfile.lock 1.0 - Adding fr-CA translation 0.0.9 - Update the locale files with the last values from the CLDR repository

License

MIT or GPL

Special thanks

github.com/svenfuchs/rails-i18n

i18n-country-translations's People

Contributors

janko avatar kpolitowicz avatar kuroda avatar nickgrim avatar onomojo avatar shingara avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.