| Module | Globalize::CoreExtensions::Object |
| In: |
vendor/plugins/globalize/lib/globalize/localization/core_ext.rb
|
Translates the supplied string into the active language. If there is a quantity involved, it can be set with the num parameter. In this case string should contain the code %d, which will be substituted with the supplied number.
If there is no translation available, default will be returned, or if it’s not supplied, the original string will be returned.
Note: This method is deprectated and is supplied for backward compatibility with other translation packages, notable gettext.
# File vendor/plugins/globalize/lib/globalize/localization/core_ext.rb, line 61
61: def _(str, default = nil, arg = nil)
62: Locale.translate(str, default, arg)
63: end