mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06:01 +01:00
Localization plugin removed (replaced with GLoc)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@14 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -37,21 +37,19 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def set_localization
|
||||
Localization.lang = begin
|
||||
if self.logged_in_user and Localization.langs.keys.include? self.logged_in_user.language
|
||||
lang = begin
|
||||
if self.logged_in_user and self.logged_in_user.language and !self.logged_in_user.language.empty? and GLoc.valid_languages.include? self.logged_in_user.language.to_sym
|
||||
self.logged_in_user.language
|
||||
elsif request.env['HTTP_ACCEPT_LANGUAGE']
|
||||
accept_lang = HTTPUtils.parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.split('-').first
|
||||
if Localization.langs.keys.include? accept_lang
|
||||
if accept_lang and !accept_lang.empty? and GLoc.valid_languages.include? accept_lang.to_sym
|
||||
accept_lang
|
||||
end
|
||||
end
|
||||
rescue
|
||||
nil
|
||||
end || $RDM_DEFAULT_LANG
|
||||
|
||||
set_language_if_valid(Localization.lang)
|
||||
|
||||
set_language_if_valid(lang)
|
||||
end
|
||||
|
||||
def require_login
|
||||
|
||||
Reference in New Issue
Block a user