Template:StripAccents: Difference between revisions
Jump to navigation
Jump to search
(found the correct RegExp syntax to deal with Unicode) |
mNo edit summary |
||
Line 7: | Line 7: | ||
* <tt><nowiki>{{StripAccents|Gegrüßet, Maria}}</nowiki></tt> returns "{{StripAccents|Gegrüßet, Maria}}" (not "Gegru'''e'''sset", for proper sorting) | * <tt><nowiki>{{StripAccents|Gegrüßet, Maria}}</nowiki></tt> returns "{{StripAccents|Gegrüßet, Maria}}" (not "Gegru'''e'''sset", for proper sorting) | ||
It is meant to be used in conjuction with template [[template: | It is meant to be used in conjuction with template [[template:NameSorter|NameSorter]] in order to generate appropriate sort keys. | ||
}} | }} | ||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Revision as of 14:25, 3 August 2009
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 NameSorter in order to generate appropriate sort keys.