class String
Public Instance Methods
tml_translated()
click to toggle source
# File lib/tml/ext/string.rb, line 46 def tml_translated return self if frozen? @tml_translated = true self end
tml_translated?()
click to toggle source
# File lib/tml/ext/string.rb, line 52 def tml_translated? @tml_translated || index('<tml:label') end
translate(desc = '', tokens = {}, options = {})
click to toggle source
# File lib/tml/ext/string.rb, line 34 def translate(desc = '', tokens = {}, options = {}) Tml.session.target_language.translate( Tml::Utils.normalize_tr_params(self, desc, tokens, options) ) end
trl(desc = '', tokens = {}, options = {})
click to toggle source
# File lib/tml/ext/string.rb, line 40 def trl(desc = '', tokens = {}, options = {}) Tml.session.target_language.translate( Tml::Utils.normalize_tr_params(self, desc, tokens, options.merge(:skip_decorations => true)) ) end