Module: Fortitude::Widget::Localization
- Extended by:
- ActiveSupport::Concern
- Included in:
- Fortitude::Widget
- Defined in:
- lib/fortitude/widget/localization.rb
Constant Summary collapse
- LOCALIZED_CONTENT_PREFIX =
"localized_content_"
Instance Method Summary collapse
-
#t(key, *args) ⇒ Object
PUBLIC API.
-
#ttext(key, *args) ⇒ Object
PUBLIC API.
Instance Method Details
#t(key, *args) ⇒ Object
PUBLIC API
12 13 14 15 16 17 18 19 |
# File 'lib/fortitude/widget/localization.rb', line 12 def t(key, *args) base = self.class.translation_base if base && key.to_s =~ /^\./ super("#{base}#{key}", *args) else super(key, *args) end end |
#ttext(key, *args) ⇒ Object
PUBLIC API
22 23 24 |
# File 'lib/fortitude/widget/localization.rb', line 22 def ttext(key, *args) tag_text t(".#{key}", *args) end |