Difference between revisions of "Template:StripAccents"

From ChoralWiki
Jump to navigation Jump to search
m (test)
(param /i for case insensitivity)
Line 1: Line 1:
<includeonly>{{#multireplace:{{{1}}}|/[àáäãâåāăą]/u=a|/[èéêëēěĕėę]/u=e|/[ìíîïĩīĭį]/u=i|/[òóôõöōŏőø]/ui=o|/[ùúûüūŭů]/u=u| /[ýÿ]/u=y|/[çćč]/u=c|/[đď]/u=d|/[ğģ]/u=g|ķ=k|/[łĺľļ]/u=l|/[ńñňņ]/u=n|/[ŕřŗ]/u=r|/[śšş]/u=s|ß=ss|ť=t|/[źżž]/u=z}}</includeonly><noinclude><!--
+
<includeonly>{{#multireplace:{{{1}}}|/[àáäãâåāăą]/ui=a|/[èéêëēěĕėę]/ui=e|/[ìíîïĩīĭį]/ui=i|/[òóôõöōŏőø]/ui=o|/[ùúûüūŭů]/ui=u| /[ýÿ]/ui=y|/[çćč]/ui=c|/[đď]/ui=d|/[ğģ]/ui=g|ķ=k|/[łĺľļ]/ui=l|/[ńñňņ]/ui=n|/[ŕřŗ]/ui=r|/[śšş]/ui=s|ß=ss|ť=t|/[źżž]/ui=z}}</includeonly><noinclude><!--
 
-->{{DisplayBox|bgcolor=g|text=
 
-->{{DisplayBox|bgcolor=g|text=
 
Removes all diacritics from a text or name
 
Removes all diacritics from a text or name

Revision as of 03:46, 18 September 2009

Removes all diacritics from a text or name

Usage:

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

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