Difference between revisions of "Template:StripAccents"

From ChoralWiki
Jump to navigation Jump to search
(param /i for case insensitivity)
m (Text formatting templates)
Line 4: Line 4:
  
 
'''Usage:'''
 
'''Usage:'''
* <tt><nowiki>{{StripAccents|Antonín Dvořák}}</nowiki></tt> returns "{{StripAccents|Antonín Dvořák}}"
+
* {{tl|StripAccents|Antonín Dvořák}} returns "{{StripAccents|Antonín Dvořák}}"
* <tt><nowiki>{{StripAccents|Gegrüßet, Maria}}</nowiki></tt> returns "{{StripAccents|Gegrüßet, Maria}}" (not "Gegru'''e'''sset", for proper sorting)
+
* {{tl|StripAccents|Gegrüßet, Maria}} returns "{{StripAccents|Gegrüßet, Maria}}" (not "Gegru'''e'''sset", for proper sorting)
  
 
It is meant to be used in conjuction with template [[template:NameSorter|NameSorter]] in order to generate appropriate sort keys.
 
It is meant to be used in conjuction with template [[template:NameSorter|NameSorter]] in order to generate appropriate sort keys.
 
}}
 
}}
[[Category:Templates|{{PAGENAME}}]]
+
[[Category:Text formatting templates]]
 
</noinclude>
 
</noinclude>

Revision as of 01:20, 19 February 2013

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.