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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C65ae2ad38a558bf864d5ec96d3b7d5a?d=identicon&s=25 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
53d6845ee2656b1ef581523da50834b8?d=identicon&s=25 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
This topic is locked and can not be replied to.