A pack of Rails generators gem plugin that generates Rails 3 and Rails 2 I18n locale files for almost every known locale.
Pull request Compare This branch is 14 commits ahead, 58 commits behind amatsuda:master.
Latest commit 1ad7e6f Feb 5, 2012 @hauleth Update README.rdoc
Failed to load latest commit information.
generators use https to GH Nov 29, 2010
spec Rails 3! Oct 25, 2010
.gitignore Update version to 1.1.2 Jan 5, 2012
Gemfile from Jeweler to Bundler May 25, 2011
MIT-LICENSE documentation May 26, 2011
README.rdoc Update README.rdoc Feb 5, 2012
Rakefile from Jeweler to Bundler May 25, 2011
i18n-generators.gemspec Update gemspec and History.txt Jan 2, 2012


I18n generators

This gem plugin generates a set of locale files for Rails i18n feature. Supports Rails 3.1, 3.0.x, 2.3.x and 2.2.x.


This gem/plugin provides following generate commands.

1. Generate Locale Files for ActiveRecord/ActiveSupport/ActionPack

rails g i18n:locale ja (de-AT, pt-BR, etc.)

Downloads the .yml file for the specified locale from the official rails-i18n repository:


Then the generater sets the application default locale to the specified locale.

This will generate following locale file.


2. Generate Translation YAML File For All Models/Attributes

rails g i18n:translation ja (de-AT, pt-BR, etc.)

This will generate following YAML file.


The generator scans your app/models directory, and generates a YAML file with all the AR model names and attributes so that you don't have to write the YAML skeleton manually or by copy/paste. In addition, the generatortries to translate each of them into the specified language. The generator doesn't overwrite the existing value so that you can rerun the generator again and again.

3. Generate All

rails g i18n:all ja # (de-AT, pt-BR, etc.)

Executes 1 and 2 at once.


  • Ruby (>= 1.8.7)

  • Ruby on Rails (3.1 or 3.0 or 2.3 or 2.2)


  • As a gem

    gem install i18n-generators
  • With Bundler


gem 'i18n-generators'

to your Gemfile, then `bundle`. Restricting the group to :development would be a good idea, since the generator would probably be used only in development mode.

  • As a Rails plugin

    rails plugin install git://github.com/Hauleth/i18n-generators.git

Copyright © 2008 - 2011 Akira Matsuda (fixed by Łukasz Niemier), released under the MIT license