bump http_accept_language
This commit is contained in:
parent
5ffbafa56a
commit
ef214d7681
3 changed files with 4 additions and 5 deletions
2
Gemfile
2
Gemfile
|
|
@ -81,7 +81,7 @@ gem 'jquery-rails', '3.0.4'
|
|||
|
||||
# Localization
|
||||
|
||||
gem 'http_accept_language', '1.0.2'
|
||||
gem 'http_accept_language', '2.0.2'
|
||||
gem 'i18n-inflector-rails', '1.0.7'
|
||||
gem 'rails-i18n', '4.0.2'
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ GEM
|
|||
tilt
|
||||
hashie (2.1.2)
|
||||
hike (1.2.3)
|
||||
http_accept_language (1.0.2)
|
||||
http_accept_language (2.0.2)
|
||||
i18n (0.6.11)
|
||||
i18n-inflector (2.6.7)
|
||||
i18n (>= 0.4.1)
|
||||
|
|
@ -522,7 +522,7 @@ DEPENDENCIES
|
|||
guard-spork (= 1.5.1)
|
||||
haml (= 4.0.5)
|
||||
handlebars_assets (= 0.12.0)
|
||||
http_accept_language (= 1.0.2)
|
||||
http_accept_language (= 2.0.2)
|
||||
i18n-inflector-rails (= 1.0.7)
|
||||
jasmine (= 2.0.2)
|
||||
jasmine-jquery-rails (= 2.0.3)
|
||||
|
|
|
|||
|
|
@ -80,8 +80,7 @@ class ApplicationController < ActionController::Base
|
|||
if user_signed_in?
|
||||
I18n.locale = current_user.language
|
||||
else
|
||||
locale = request.preferred_language_from AVAILABLE_LANGUAGE_CODES
|
||||
locale ||= request.compatible_language_from AVAILABLE_LANGUAGE_CODES
|
||||
locale = http_accept_language.language_region_compatible_from AVAILABLE_LANGUAGE_CODES
|
||||
locale ||= DEFAULT_LANGUAGE
|
||||
I18n.locale = locale
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue