diff --git a/.template/spec/base/config/environments/production_spec.rb b/.template/spec/base/config/environments/production_spec.rb index 094048ef..9a1d71a0 100644 --- a/.template/spec/base/config/environments/production_spec.rb +++ b/.template/spec/base/config/environments/production_spec.rb @@ -34,9 +34,14 @@ def mailer_default_url_config def i18n_config <<~EOT - config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(', ') + # eg: AVAILABLE_LOCALES = 'en,th' + config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(',') + + # eg: DEFAULT_LOCALE = 'en' config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE') - config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(', ') + + # eg: FALLBACK_LOCALES = 'en,th' + config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(',') EOT end end diff --git a/config/environments/production.rb b/config/environments/production.rb index d2415baf..92555b19 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -20,9 +20,14 @@ # Adding the correct fallback configuration along with default locale and available locales environment do <<~EOT - config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(', ') + # eg: AVAILABLE_LOCALES = 'en,th' + config.i18n.available_locales = ENV.fetch('AVAILABLE_LOCALES').split(',') + + # eg: DEFAULT_LOCALE = 'en' config.i18n.default_locale = ENV.fetch('DEFAULT_LOCALE') - config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(', ') + + # eg: FALLBACK_LOCALES = 'en,th' + config.i18n.fallbacks = ENV.fetch('FALLBACK_LOCALES').split(',') EOT end