Skip to content

Instantly share code, notes, and snippets.

@akirill0v
Created September 9, 2012 18:27
Show Gist options
  • Save akirill0v/3686287 to your computer and use it in GitHub Desktop.
Save akirill0v/3686287 to your computer and use it in GitHub Desktop.
i18n
store_translations(:de, :i18n => {
:transliterate => {
:rule => {
"ü" => "ue",
"ö" => "oe"
}
}
)
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment