forked from External/greenlight
* <Added ui for language setting and migration> * <Option to choose languages added> * <Fixed code style> * <Added Rspec tests> * <sync db> * <Sync db> * <Generalized language settings> * <Fixed flash message> * Fixed las issue with i18n fallback * <Modified fallback config> * <Fixed code style>
This commit is contained in:
13
config/initializers/languages.rb
Normal file
13
config/initializers/languages.rb
Normal file
@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Load available languages.
|
||||
|
||||
locales = "#{Rails.root}/config/locales/*"
|
||||
|
||||
configured_languages = []
|
||||
|
||||
Dir.glob(locales) do |loc|
|
||||
configured_languages.push(loc.split('/').last.split('.').first)
|
||||
end
|
||||
|
||||
Rails.configuration.languages = configured_languages
|
Reference in New Issue
Block a user