Template:StripAccents

From ChoralWiki
Revision as of 05:45, 17 May 2009 by Carlos (talk | contribs) (found the correct RegExp syntax to deal with Unicode)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Removes all diacritics from a text or name

Usage:

  • {{StripAccents|Antonín Dvořák}} returns "{{#multireplace:Antonín Dvořák|/[àáäãâåāăą]/u=a|/[èéêëēěĕėę]/u=e|/[ìíîïĩīĭį]/u=i|/[òóôõöōŏőø]/u=o|/[ùúûüūŭů]/u=u| /[ýÿ]/u=y|/[çćč]/u=c|/[đď]/u=d|/[ğģ]/u=g|ķ=k|/[łĺľļ]/u=l|/[ńñňņ]/u=n|/[ŕřŗ]/u=r|/[śšş]/u=s|ß=ss|ť=t|/[źżž]/u=z}}"
  • {{StripAccents|Gegrüßet, Maria}} returns "{{#multireplace:Gegrüßet, Maria|/[àáäãâåāăą]/u=a|/[èéêëēěĕėę]/u=e|/[ìíîïĩīĭį]/u=i|/[òóôõöōŏőø]/u=o|/[ùúûüūŭů]/u=u| /[ýÿ]/u=y|/[çćč]/u=c|/[đď]/u=d|/[ğģ]/u=g|ķ=k|/[łĺľļ]/u=l|/[ńñňņ]/u=n|/[ŕřŗ]/u=r|/[śšş]/u=s|ß=ss|ť=t|/[źżž]/u=z}}" (not "Gegruesset", for proper sorting)

It is meant to be used in conjuction with template LastName in order to generate appropriate sort keys.