Displaying 2 results from an estimated 2 matches for "init_translations".
2009 Jun 24
3
I18N: allocator undefined for Proc
...9;'
C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in
`load_translations''
C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:85:in
`init_translations''
Can anyone help me?
Best regards,
Migrate
--
Posted via http://www.ruby-forum.com/.
2010 Feb 16
7
YAML, UTF-8, TextMate, Notepad
...class << self
def available_locales; backend.available_locales; end
end
module Backend
class Simple
def available_locales; translations.keys.collect { |l| l.to_s
}.sort; end end
end
end
# You need to "force-initialize" loaded locales
I18n.backend.send(:init_translations)
AVAILABLE_LOCALES = I18n.backend.available_locales
RAILS_DEFAULT_LOGGER.debug "* Loaded locales:
#{AVAILABLE_LOCALES.inspect}"
#Shnelvar: Remove UTF-8 indicator bytes so that YAML::load works
AVAILABLE_LOCALES.each do |localization_name|
# localization_name is, e.g. "d...