2018-01-22 08:42:12 -05:00
|
|
|
module I18n
|
|
|
|
module Backend
|
|
|
|
# Configure custom fallback order
|
|
|
|
class FallbackLocaleList < Hash
|
|
|
|
def [](locale)
|
2018-01-25 06:09:18 -05:00
|
|
|
fallback_locale = LocaleSiteSetting.fallback_locale(locale)
|
|
|
|
[locale, fallback_locale, SiteSetting.default_locale.to_sym, :en].uniq.compact
|
2018-01-22 08:42:12 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|