Sha256: 7b454857d2172994e5f0729df7598d6f7b24cb8ac66a42b44fb46fe9e80d6d13

Contents?: true

Size: 1.74 KB

Versions: 1

Compression:

Stored size: 1.74 KB

Contents

= I18n generators

This gem plugin generates a set of locale files for Rails 3 i18n feature.

* http://github.com/amatsuda/i18n_generators
* http://rubygems.org/gems/i18n_generators

For Rails 2.3 and 2.2, use 0.8.x gem or rails2 branch.

* http://github.com/amatsuda/i18n_generators/tree/rails2
* http://rubygems.org/gems/i18n_generators/versions/0.8.1

== FEATURES

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:
    http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale

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

This will generate following locale file.

    config/locales/ja.yml

=== 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.

    config/locales/translation_ja.yml

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 generator tries 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 ja (de-AT, pt-BR, etc.)

Executes 1 and 2 at once.


== REQUIREMENTS:

* Ruby on Rails (>= 3.0)


== INSTALL:

* As a gem

% gem install i18n_generators

* As a Rails plugin

% rails plugin install git://github.com/amatsuda/i18n_generators.git


Copyright (c) 2008  Akira Matsuda, released under the MIT license

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_generators-1.0.0.pre1 README.rdoc