Module:Language/Documentation

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search

This is the documentation page for Module:Language

The source of truth for languages relevant to The Legend of Zelda series.

This module exports the following functions.

enum

enum([options])

Parameters

Returns

Examples

#InputOutput
1
enum()
{
  "enBr",
  "ja",
  "zhT",
  "zhS",
  "cs",
  "da",
  "nl",
  "fi",
  "frC",
  "frF",
  "de",
  "hu",
  "it",
  "ko",
  "he",
  "no",
  "pl",
  "ptB",
  "ptP",
  "ru",
  "esL",
  "esS",
  "sv",
  reference = "[[Module:Language/Data]]",
}
2
enum({ includeWikiLanguage = true })
{
  "enAm",
  "enBr",
  "ja",
  "zhT",
  "zhS",
  "cs",
  "da",
  "nl",
  "fi",
  "frC",
  "frF",
  "de",
  "hu",
  "it",
  "ko",
  "he",
  "no",
  "pl",
  "ptB",
  "ptP",
  "ru",
  "esL",
  "esS",
  "sv",
  reference = "[[Module:Language/Data]]",
}

getLect

getLect(code, [options])

Parameters

Returns

  • A Lua table of information on a particular lect (a language or variant thereof), or nil if the given code does not exist in Module:Language/Data.
  • An error category if the given code does not exist in Module:Language/Data.

Examples

#InputOutputStatus
3
getLect("enBr")
{
  abbr = "English<sup>'\"`UNIQ--templatestyles-0000002C-QINU`\"'<span class=\"explain tooltip\" title=\"British\">BR</span></sup>",
  lang = "English",
  name = "British English",
  flags = {
    '<span class="tooltip" title="The United Kingdom of Great Britain and Northern Ireland">[[File:United Kingdom Flag.png|20px|The United Kingdom of Great Britain and Northern Ireland]]</span>',
  },
}
nil
Green check.svg
4
getLect("ja", { flagSize = "40px" })
{
  abbr = "Japanese",
  lang = "Japanese",
  name = "Japanese",
  flags = {
    '<span class="tooltip" title="Japan">[[File:Japan Flag.png|40px|Japan]]</span>',
  },
}
Green check.svg
nil
Green check.svg
5
getLect("zhT")
{
  abbr = "Chinese<sup>'\"`UNIQ--templatestyles-00000009-QINU`\"'<span class=\"explain tooltip\" title=\"Traditional\">TR</span></sup>",
  lang = "Chinese",
  name = "Traditional Chinese",
  flags = {
    '<span class="tooltip" title="The Republic of China">[[File:Taiwan Flag.svg|20px|The Republic of China]]</span>',
    '<span class="tooltip" title="The Hong Kong Special Administrative Region of China">[[File:Hong Kong Flag.svg|20px|The Hong Kong Special Administrative Region of China]]</span>',
    '<span class="tooltip" title="The Macao Special Administrative Region of China">[[File:Macao Flag.svg|20px|The Macao Special Administrative Region of China]]</span>',
  },
}
nil
Green check.svg
6
getLect("narnia")
nil
Green check.svg
"[[Category:Articles using invalid arguments in template calls]]"
Green check.svg