Forum: Ruby on Rails Localization (again) a la Thomas Fuchs

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.
Adam G. (Guest)
on 2006-05-11 15:48
Has anyone had any success adapting The Localization plugin in order for
the language to be selected based on a user's account (i.e:session)?
Adam G. (Guest)
on 2006-05-11 16:57
Adam G. wrote:
> Has anyone had any success adapting The Localization plugin in order for
> the language to be selected based on a user's account (i.e:session)?

This is probably blatently obvious but for those of you who might be
interested; nothing needed altering with the Localization plugin
(surprise, surprise!).

In the relevant controller(s) or in application.rb.

  def set_language
        Localization.lang = session[:lang]
  end

and then:

before_filter :set_language
This topic is locked and can not be replied to.