Module:Diacritics

From blackwiki
Revision as of 10:29, 17 November 2018 by blackwiki>RexxS (start Accents)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Functions

  • 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

  • {{#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

  • {{#invoke: Diacritics |convertChar |char=è }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |convertChar | ß }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits |word = Fred}}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits | Fred }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits | café }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits | décidé }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits | chère }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits | Übersetzung }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |stripDiacrits | Álvar Núñez Cabeza de Vaca }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |isLike | Núñez | Nunez }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |isLike | Núñez | Núñez }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |isLike | Nunez | Nunez }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |isLike | Álvar Núñez | Alvar Nunez }}Script error: The module returned a nil value. It is supposed to return an export table.
  • {{#invoke: Diacritics |isLike | Álvar | Núñez }}Script error: The module returned a nil value. It is supposed to return an export table.



--[[


--]]

local p = {}

local chars = {
	a = { 'á', },
}