Sha256: a4f2527c9860988354e81c1f6cc220c7a6daea15d7a4f2a961181e9a55953a93

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

#I18nAttributes

I18nAttributes is a generate model attributes I18n locale files plugin for Rails3.

* https://github.com/vkill/i18n_attributes

##Supported versions

* Ruby 1.8.7, 1.9.2, 1.9.3

* Rails 3.0.x, 3.1


##Installation

In your app's `Gemfile`, add:

    gem "i18n_attributes", :group => [:development]

Then run:

    > bundle
    > rails generate i18n_attributes:install

If your want to configure, see `config/initializers/i18n_attributes.rb`


##Uninstallation

Run:

    > rails destroy i18n_attributes:install


##Usage Example

When your generate post model, then hook invoke, create `config/locales/model_zh-CN/post.yml` file

    > rails g model post title:string
        invoke  active_record
        create    db/migrate/20111119121327_create_posts.rb
        create    app/models/post.rb
        invoke    test_unit
        create      test/unit/post_test.rb
        create      test/fixtures/posts.yml
        invoke  i18n_attributes
        create    config/locales/model_en/post.yml
        create    config/locales/model_zh-CN/post.yml

If your models has been created, you want generate model attributes i18n locale file,very easy also, run

    > rails g i18n_attributes:revise_model
        create  config/locales/model_en/post.yml
        create  config/locales/model_zh-CN/post.yml


##Copyright

Copyright (c) 2011 vkill.net .

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
i18n_attributes-0.1.4 README.markdown
i18n_attributes-0.1.3 README.markdown
i18n_attributes-0.1.2 README.markdown