mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 00:25:38 +08:00
12 lines
307 B
Ruby
12 lines
307 B
Ruby
module I18n
|
|
module Backend
|
|
# Configure custom fallback order
|
|
class FallbackLocaleList < Hash
|
|
def [](locale)
|
|
fallback_locale = LocaleSiteSetting.fallback_locale(locale)
|
|
[locale, fallback_locale, SiteSetting.default_locale.to_sym, :en].uniq.compact
|
|
end
|
|
end
|
|
end
|
|
end
|