discourse/lib/i18n/backend/fallback_locale_list.rb

11 lines
222 B
Ruby

module I18n
module Backend
# Configure custom fallback order
class FallbackLocaleList < Hash
def [](locale)
[locale, SiteSetting.default_locale.to_sym, :en].uniq.compact
end
end
end
end