Added env variable to set the default language (#2147)

This commit is contained in:
Ahmad Farhat
2020-10-02 09:50:24 -04:00
committed by GitHub
parent 165eeccb23
commit 07557f45dc
3 changed files with 13 additions and 1 deletions

View File

@ -101,7 +101,7 @@ class ApplicationController < ActionController::Base
locale = if user && user.language != 'default'
user.language
else
http_accept_language.language_region_compatible_from(I18n.available_locales)
Rails.configuration.default_locale.presence || http_accept_language.language_region_compatible_from(I18n.available_locales)
end
begin