3 new I18n gems for your Rails 3 app
Monday, April 2nd, 2012I’ve been busy building 3 new translation gems for a new application I’m working on. The first is i18n-country-translations. It breaks countries down into their standard country codes and adds translates for different locales. This gem can be easily incorporated into other gems or apps that need I18n country translations. Just add this to your Gemfile:
gem 'i18n-country-translations'
You can grab the source and more information here: https://github.com/onomojo/i18n-country-translations
The next gem I created uses the i18n-country-translations gem to make a country select that automatically translates the country names in the select drop down to the current locale. Just add this to your Gemfile:
gem 'i18n_country_select'
You can grab the source and find out more here: https://github.com/onomojo/i18n_country_select
Finally, no app that has any dates displayed to users can be complete without taking into account timezones. The last gem is i18n-timezones and just adds timezone translations which can easily be included into other gems or directly in your app. It also adds a convenient ActiveSupport::TimeZone override of to_s so that it takes the current locale into consideration. This makes it extremely easy to add timezone translations. Just add this to your Gemfile:
gem 'i18n-timezones'
You can grab the source and find out more here: https://github.com/onomojo/i18n-timezones


