Jesus Federico 5ba5b663ac
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
2019-03-28 11:02:36 -04:00

13 lines
299 B
Ruby

# frozen_string_literal: true
# Load available languages.
configured_languages = []
locales = Dir.glob("#{Rails.root}/config/locales/*")
locales.each do |loc|
configured_languages.push(loc.split('/').last.split('.').first)
end
Rails.configuration.i18n.available_locales = configured_languages