remove http header language detection
This commit is contained in:
@@ -9,11 +9,9 @@
|
|||||||
if params[:locale]
|
if params[:locale]
|
||||||
if I18n.available_locales.include?(params[:locale].to_sym)
|
if I18n.available_locales.include?(params[:locale].to_sym)
|
||||||
session[:locale] = params[:locale]
|
session[:locale] = params[:locale]
|
||||||
|
|
||||||
else
|
else
|
||||||
flash.now[:notice]= "#{params[:locale]} translation not available"
|
flash.now[:notice]= "#{params[:locale]} translation not available"
|
||||||
logger.error flash.now[:notice]
|
logger.error flash.now[:notice]
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
|
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
|
||||||
@@ -22,8 +20,8 @@
|
|||||||
else
|
else
|
||||||
ht=nil
|
ht=nil
|
||||||
end
|
end
|
||||||
I18n.locale = session[:locale] || ht || I18n.default_locale
|
I18n.locale = session[:locale] || I18n.default_locale
|
||||||
|
# removed ht from selection add || ht to check http header
|
||||||
|
|
||||||
session[:locale] = I18n.locale
|
session[:locale] = I18n.locale
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user