Forum: Ruby on Rails L18n help

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.
sekhar (Guest)
on 2005-12-30 10:25
(Received via mailing list)
i need some help writing some code in rails about cookies.

what i want to do is depending on the cookie value sent i want to set
the
language for the page .
the code is something like
in applicationcontroller.rb

 $KCODE = 'u' # lets go unicode, you will have less trouble ...
  require 'jcode' # and use the right string methods for utf-8
   # The directory where translation files (PO files) will go
  I18nService.instance.po_dir = "#{RAILS_ROOT}/locale"
   # let's use telugu everywhere
   @lan = lan ="te"
   I18nService.instance.lang = lan

what i want to do is let the user select language from drop down list
and
then pass that value to set the lan variable which would give the
desired
language interface
This topic is locked and can not be replied to.