def transliterate(key, *, throw: false, raise: false, locale: nil, replacement: nil, **options)
      locale ||= config.locale
      raise Disabled.new('transliterate') if locale == false
      enforce_available_locales!(locale)

      config.backend.transliterate(locale, key, replacement)
    rescue I18n::ArgumentError => exception
      handle_exception((throw && :throw || raise && :raise), exception, locale, key, options)
    end
def transliterate(key, *, throw: false, raise: false, locale: nil, replacement: nil, **options)
      locale ||= config.locale
      raise Disabled.new('transliterate') if locale == false
      enforce_available_locales!(locale)

      config.backend.transliterate(locale, key, replacement)
    rescue I18n::ArgumentError => exception
      handle_exception((throw && :throw || raise && :raise), exception, locale, key, options)
    end
Transliterates UTF-8 characters to ASCII. By default this method will
 transliterate only Latin strings to an ASCII approximation:

    I18n.transliterate("Ærøskøbing")
    # => "AEroskobing"

    I18n.transliterate("日本語")
    # => "???"

 It's also possible to add support for per-locale transliterations. I18n
 expects transliteration rules to be stored at
 <tt>i18n.transliterate.rule</tt>.

 Transliteration rules can either be a Hash or a Proc. Procs must accept a
 single string argument. Hash rules inherit the default transliteration
 rules, while Procs do not.

 *Examples*

 Setting a Hash in <locale>.yml:

    i18n:
      transliterate:
        rule:
          ü: "ue"
          ö: "oe"

 Setting a Hash using Ruby:

     store_translations(:de, :i18n => {
       :transliterate => {
         :rule => {
           "ü" => "ue",
           "ö" => "oe"
         }
       }
     )

 Setting a Proc:

     translit = lambda {|string| MyTransliterator.transliterate(string) }
     store_translations(:xx, :i18n => {:transliterate => {:rule => translit})

 Transliterating strings:

     I18n.locale = :en
     I18n.transliterate("Jürgen") # => "Jurgen"
     I18n.locale = :de
     I18n.transliterate("Jürgen") # => "Juergen"
     I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
     I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"