Sha256: 5f732d7eb1b7914c5053e231a2e92803bdcbbfee28d78a4d31e0aed57110a0d6
Contents?: true
Size: 747 Bytes
Versions: 15
Compression:
Stored size: 747 Bytes
Contents
module SymbolExtension # :nodoc: # Localizes the symbol into the current locale. # If there is no translation available, the replacement string will be returned def localize(replacement_string = '__localization_missing__', args={}) Globalite.localize(self, replacement_string, args) end alias :l :localize def l_in(locale, args={}) Globalite.localize(self, '_localization_missing_', args, locale) unless locale.nil? end # Note that this method takes the replacement string after the args hash unlike other Globalite methods def localize_with_args(args={}, replacement_string = '__localization_missing__') Globalite.localize(self, replacement_string, args) end alias :l_with_args :localize_with_args end
Version data entries
15 entries across 15 versions & 6 rubygems