Module | I18n::Backend::Fallbacks |
In: |
lib/i18n/backend/fallbacks.rb
|
Overwrites the Base backend translate method so that it will try each locale given by I18n.fallbacks for the given locale. E.g. for the locale :"de-DE" it might try the locales :"de-DE", :de and :en (depends on the fallbacks implementation) until it finds a result with the given options. If it does not find any result for any of the locales it will then throw MissingTranslation as usual.
The default option takes precedence over fallback locales only when it‘s a Symbol. When the default contains a String or a Proc it is evaluated last after all the fallback locales have been tried.