Class: Slices::I18nBackend
- Inherits:
-
Object
- Object
- Slices::I18nBackend
- Includes:
- I18n::Backend::Simple::Implementation
- Defined in:
- lib/slices/i18n_backend.rb
Instance Method Summary collapse
-
#translate(locale, key, options = {}) ⇒ Object
Translates the given local and key.
Instance Method Details
#translate(locale, key, options = {}) ⇒ Object
Translates the given local and key. See the I18n API documentation for details.
10 11 12 13 14 15 16 17 |
# File 'lib/slices/i18n_backend.rb', line 10 def translate(locale, key, = {}) content = super(locale, key, .merge(fallback: true)) if content.respond_to?(:html_safe) content.html_safe else content end end |