Forum: Rails I18n Trying to do simple model I18n, not succeeding.

Posted by Rich Pav (richpav)
on 2009-02-23 09:11
Basically, all my tables look like this:

  create_table "countries", :force => true do |t|
    t.string "name_en"
    t.string "name_ja"
  end

If the locale is set to 'en', I want Country.name to return
Country.name_en. Is there a way to do this?

Rich
Posted by Jean-Philippe Moal (Guest)
on 2009-02-23 16:56
(Received via mailing list)
Rich Pav a écrit :
> Basically, all my tables look like this:
> 
>   create_table "countries", :force => true do |t|
>     t.string "name_en"
>     t.string "name_ja"
>   end
> 
> If the locale is set to 'en', I want Country.name to return
> Country.name_en. Is there a way to do this?
> 
You are looking for the great translatable_columns plugin by Iain :
http://github.com/iain/translatable_columns/tree/master
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.