[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
|
protected
|
||||||
|
|
||||||
def set_locale
|
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
|
end
|
||||||
|
|
||||||
def get_user_locale
|
def get_user_locale
|
||||||
|
|
Loading…
Reference in New Issue