Displaying 2 results from an estimated 2 matches for "po_dir".
Did you mean:
io_dir
2007 Jan 19
1
Trouble with Rails/Ri18n
...Service.instance.lang
= ''de'' manually, I expected a translation to germany for all pages.
Rakefile works perfectly with "rake gettext":
.....
# Ri18n
task :gettext do
require ''i18nservice''
require ''gettext''
I18nService.instance.po_dir = ''locale''
Rake::GettextTask.new do |t|
t.new_langs = [''de'']
t.source_files =
[''{lib,app,components}/**/*.r{b,html,xml}'']
t.verbose = true
end
end
environment.rb states:
# Include your application configuration below
# R...
2005 Dec 30
0
L18n help
...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 inte...