HAHA EVERYONE GOT FRENCH BECAUSE I USED A DEPENDENCY, SERVES ME RIGHT

This commit is contained in:
Yuki 2015-06-10 01:06:47 +05:30
parent a61a54fb82
commit c358c34043
3 changed files with 2 additions and 5 deletions

View File

@ -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'

View File

@ -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

View File

@ -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]