1 # Get loaded locales conveniently
2 # See http://rails-i18n.org/wiki/pages/i18n-available_locales
5 def available_locales; backend.available_locales; end
9 def available_locales; translations.keys.collect { |l| l.to_s }.sort; end
10 def langs; translations.values end
15 # You need to "force-initialize" loaded locales
16 I18n.backend.send(:init_translations)
18 #AVAILABLE_LOCALES = I18n.backend.available_locales
19 #RAILS_DEFAULT_LOGGER.debug "* Loaded locales: #{AVAILABLE_LOCALES.inspect}"