instance method
transliterate
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
transliterate(locale, string, replacement = nil)
Given a locale and a UTF-8 string, return the locale’s ASCII approximation for the string.
Parameters
-
localereq -
stringreq -
replacementopt = nil
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/transliterator.rb, line 9
def transliterate(locale, string, replacement = nil)
@transliterators ||= {}
@transliterators[locale] ||= Transliterator.get I18n.t(:'i18n.transliterate.rule',
:locale => locale, :resolve => false, :default => {})
@transliterators[locale].transliterate(string, replacement)
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/transliterator.rb line 9
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::Transliterator