Module: Trestle::I18nHelper
- Defined in:
- app/helpers/trestle/i18n_helper.rb
Instance Method Summary collapse
Instance Method Details
#i18n_fallbacks(locale = I18n.locale) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/trestle/i18n_helper.rb', line 3 def i18n_fallbacks(locale=I18n.locale) if I18n.respond_to?(:fallbacks) I18n.fallbacks[locale] elsif locale.to_s.include?("-") fallback = locale.to_s.split("-").first [locale, fallback] else [locale] end end |