1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Update web_helpers.rb

fix a bug about zh-cn support.
This commit is contained in:
wndfly 2014-09-19 15:37:05 +08:00
parent 271fa146fc
commit 58f8eb98bf

View file

@ -21,7 +21,7 @@ module Sidekiq
end
def locale
lang = (request.env["HTTP_ACCEPT_LANGUAGE"] || 'en')[0,2]
lang = (request.env["HTTP_ACCEPT_LANGUAGE"] || 'en').split(',')[0].downcase
strings[lang] ? lang : 'en'
end