Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
c2c0c103
Commit
c2c0c103
authored
Jul 14, 2014
by
Francisco de Juan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
force english as uniq locale
parent
dddda143
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
application_controller.rb
app/controllers/application_controller.rb
+1
-12
No files found.
app/controllers/application_controller.rb
View file @
c2c0c103
...
...
@@ -127,18 +127,7 @@ class ApplicationController < ActionController::Base
end
def
set_localization
lang
=
nil
if
User
.
current
.
logged?
lang
=
find_language
(
User
.
current
.
language
)
end
if
lang
.
nil?
&&
request
.
env
[
'HTTP_ACCEPT_LANGUAGE'
]
accept_lang
=
parse_qvalues
(
request
.
env
[
'HTTP_ACCEPT_LANGUAGE'
]).
first
if
!
accept_lang
.
blank?
accept_lang
=
accept_lang
.
downcase
lang
=
find_language
(
accept_lang
)
||
find_language
(
accept_lang
.
split
(
'-'
).
first
)
end
end
lang
||=
Setting
.
default_language
lang
=
Setting
.
default_language
set_language_if_valid
(
lang
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment