Hi,
I am new to Ruby/Rails but totally fall in love with
Nonetheless, today I am totally stuck with Ri18n. I basically followed
the 10 Steps to Make Your Rails Apps Multilingual. No errors are
thrown,
the english version works as before with the freshly added <%= _('') %>
Still, no translations are performed. Setting I18nService.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
# Require Rails libraries (Ri18n)
require 'rubygems'
require 'gettext'
require 'i18nservice'
$KCODE = 'u' # unicode
require 'jcode' # correct string methods for
utf8
I18nService.instance.po_dir = "locale" # original:
"#{RAILS_ROOT}/locale"
I18nService.instance.lang = 'de'
ADDITIONAL_LOAD_PATHS.concat %w(
     # ... other entries
     vendor
     vendor/ri18n/lib
     # ... other entries
   ).map { |dir| "#{RAILS_ROOT}/#{dir}" }.select { |dir|
File.directory?(dir) }
/locale/de.po states:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE
package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.