mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-02 06:51:40 +00:00
Add available_locales config feature
This commit is contained in:
committed by
Maikel Linke
parent
9429695e15
commit
5166a3d958
@@ -71,6 +71,7 @@ module Openfoodnetwork
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
config.i18n.default_locale = ENV["LOCALE"]
|
||||
config.i18n.available_locales = ENV["AVAILABLE_LOCALES"].andand.split(',').andand.map(&:strip) || [config.i18n.default_locale]
|
||||
I18n.locale = config.i18n.locale = config.i18n.default_locale
|
||||
|
||||
# Setting this to true causes a performance regression in Rails 3.2.17
|
||||
|
||||
@@ -9,6 +9,8 @@ TIMEZONE: Melbourne
|
||||
DEFAULT_COUNTRY_CODE: AU
|
||||
# Locale for translation.
|
||||
LOCALE: en
|
||||
# For multilingual - ENV doesn't have array so pass it as string with commas
|
||||
AVAILABLE_LOCALES: en,es,en-GB
|
||||
# Spree zone.
|
||||
CHECKOUT_ZONE: Australia
|
||||
# Find currency codes at http://en.wikipedia.org/wiki/ISO_4217.
|
||||
|
||||
Reference in New Issue
Block a user