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