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)? -- Posted via http://www.ruby-forum.com/.
Adam Groves
2006-May-11 12:57 UTC
[Rails] Re: Localization (again) a la Thomas Fuchs - SOLVED! (duh)
Adam Groves 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 -- Posted via http://www.ruby-forum.com/.