Merge remote branch 'ed0h/i18n-fallbacks'
Conflicts: pkg/ubuntu/dist
This commit is contained in:
commit
377cae8cba
2 changed files with 5 additions and 2 deletions
|
|
@ -35,7 +35,6 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def set_locale
|
||||
I18n.default_locale = DEFAULT_LANGUAGE
|
||||
if current_user
|
||||
I18n.locale = current_user.language
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4,4 +4,8 @@
|
|||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
|
||||
I18n.default_locale = :en
|
||||
I18n.default_locale = DEFAULT_LANGUAGE
|
||||
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
||||
AVAILABLE_LANGUAGE_CODES.each do |c|
|
||||
I18n.fallbacks[c.to_sym] = [c.to_sym, DEFAULT_LANGUAGE.to_sym, :en]
|
||||
end
|
||||
Loading…
Reference in a new issue