HAHA EVERYONE GOT FRENCH BECAUSE I USED A DEPENDENCY, SERVES ME RIGHT
This commit is contained in:
parent
a61a54fb82
commit
c358c34043
1
Gemfile
1
Gemfile
|
@ -25,7 +25,6 @@ gem 'bootswatch-rails'
|
|||
gem 'sweetalert-rails'
|
||||
gem 'will_paginate'
|
||||
gem 'will_paginate-bootstrap'
|
||||
gem 'http_accept_language'
|
||||
gem 'devise'
|
||||
gem 'devise-i18n'
|
||||
gem 'devise-async'
|
||||
|
|
|
@ -219,7 +219,6 @@ GEM
|
|||
hitimes (1.2.2)
|
||||
http (0.6.4)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http_accept_language (2.0.5)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.7.0)
|
||||
i18n-js (3.0.0.rc10)
|
||||
|
@ -498,7 +497,6 @@ DEPENDENCIES
|
|||
font-kit-rails
|
||||
foreman
|
||||
haml
|
||||
http_accept_language
|
||||
i18n-js
|
||||
jbuilder (~> 2.2.4)
|
||||
jquery-rails
|
||||
|
|
|
@ -16,8 +16,8 @@ class ApplicationController < ActionController::Base
|
|||
I18n.locale = current_user.locale
|
||||
elsif not cookies[:hl].nil?
|
||||
I18n.locale = cookies[:hl]
|
||||
elsif not http_accept_language.user_preferred_languages.length > 0
|
||||
I18n.locale = http_accept_language.compatible_language_from(I18n.available_locales) or "en"
|
||||
else
|
||||
I18n.locale = 'en'
|
||||
end
|
||||
else
|
||||
I18n.locale = params[:hl]
|
||||
|
|
Loading…
Reference in New Issue