Jump to content

Module:Diacritics/doc

From Wikipedia, the free encyclopedia


Functions

[edit]
  • convertChar returns the non-diacritic version of the supplied character.
  • stripDiacrits replaces words containing diacritical characters with their non-diacritic equivalent.
  • isLike tests two words, returning true if they only differ in diacritics, nothing otherwise.
  • strip_diacrits is available for export to other modules.
  • is_like is available for export to other modules.

Usage

[edit]
  • {{#invoke:Diacritics |convertChar | single-character }}
  • {{#invoke:Diacritics |convertChar |char=single-character}}
  • {{#invoke:Diacritics |stripDiacrits |word or words }}
  • {{#invoke:Diacritics |stripDiacrits |word=word or words}}
  • {{#invoke:Diacritics |isLike | word1 or words1 | word2 or words2 }}
  • {{#invoke:Diacritics |isLike |word1=word1 or words1 |word2=word2 or words2}}

Examples

[edit]
  • {{#invoke: Diacritics |convertChar |char=è }} → e
  • {{#invoke: Diacritics |convertChar | ß }} → ss
  • {{#invoke: Diacritics |stripDiacrits |word = Fred}} → Fred
  • {{#invoke: Diacritics |stripDiacrits | Fred }} → Fred
  • {{#invoke: Diacritics |stripDiacrits | café }} → cafe
  • {{#invoke: Diacritics |stripDiacrits | décidé }} → decide
  • {{#invoke: Diacritics |stripDiacrits | chère }} → chere
  • {{#invoke: Diacritics |stripDiacrits | Übersetzung }} → Ubersetzung
  • {{#invoke: Diacritics |stripDiacrits | Álvar Núñez Cabeza de Vaca }} → Alvar Nunez Cabeza de Vaca
  • {{#invoke: Diacritics |isLike | Núñez | Nunez }} → true
  • {{#invoke: Diacritics |isLike | Núñez | Núñez }} → true
  • {{#invoke: Diacritics |isLike | Nunez | Nunez }} → true
  • {{#invoke: Diacritics |isLike | Álvar Núñez | Alvar Nunez }} → true
  • {{#invoke: Diacritics |isLike | Álvar | Núñez }}