[refs #443] fixed error whis empty accept languages
This commit is contained in:
parent
2651f0dc52
commit
8facb45bb7
|
@ -21,7 +21,8 @@ class ApplicationController < ActionController::Base
|
|||
protected
|
||||
|
||||
def set_locale
|
||||
I18n.locale = check_locale( get_user_locale || request.env['HTTP_ACCEPT_LANGUAGE'][0,2].downcase )
|
||||
I18n.locale = check_locale( get_user_locale ||
|
||||
request.env['HTTP_ACCEPT_LANGUAGE'] ? request.env['HTTP_ACCEPT_LANGUAGE'][0,2].downcase : nil )
|
||||
end
|
||||
|
||||
def get_user_locale
|
||||
|
|
Loading…
Reference in New Issue