forked from External/greenlight
GRN-86: Change the way the locales are handled (#417)
* Changed the way locales are shown * Updated the rest of the locales * Changed the way available_locales are defined * Updated locales in Russian * Updated locaales for German
This commit is contained in:
@ -2,12 +2,11 @@
|
||||
|
||||
# Load available languages.
|
||||
|
||||
locales = "#{Rails.root}/config/locales/*"
|
||||
|
||||
configured_languages = []
|
||||
|
||||
Dir.glob(locales) do |loc|
|
||||
locales = Dir.glob("#{Rails.root}/config/locales/*")
|
||||
locales.each do |loc|
|
||||
configured_languages.push(loc.split('/').last.split('.').first)
|
||||
end
|
||||
|
||||
Rails.configuration.languages = configured_languages
|
||||
Rails.configuration.i18n.available_locales = configured_languages
|
||||
|
Reference in New Issue
Block a user