• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Wikt-lang/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Wikt-lang
This is the template sandbox page for Template:Wikt-lang (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 4,200 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Shortcut
  • {{wktlTemplate:Wktl}}
This template uses Lua:
  • Module:Wikt-lang (sandbox)
Language templates
Language names (ISO 639)
  • {{ISO 639 name}}
Interwiki links
  • {{Wikt-lang}}
  • Module:Wikt-lang
  • Module:Wikt-lang/data
  • {{Interlanguage link}}
Foreign-language text
  • {{Lang}}
  • {{Langx}}
  • Module:Lang
  • {{Transliteration}}
  • {{Title language}}
Other
  • {{IPA}}
  • v
  • t
  • e

Template:Wikt-lang generates a link to the correct section of the corresponding Wiktionary entry by automatically determining the correct English Wiktionary entry by removing italics or bolding, and removing or replacing diacritical marks and letters that are not used in entry names on English Wiktionary.

It also adds italics for languages that use the Latin alphabet (see MOS:FOREIGNITALIC). Italics cannot be turned on for languages that use a non-Latin script, but they can be turned off by using the parameter |i=-. This is useful in tables, where italics are often unnecessary.

The template will also link to the Wiktionary Reconstruction: namespace, where entries on reconstructed languages are placed, or to the Appendix: namespace, where some constructed languages have their entries (such as Lojban), if there is data for them in the module, Module:Wikt-lang, at Module:Wikt-lang/data.

Contents

  • 1 Usage
  • 2 Parameters
    • 2.1 TemplateData
  • 3 Examples
  • 4 Help
  • 5 See also

Usage

edit

This template takes a language code and one or two words, and generates a link to the correct section of the corresponding Wiktionary entry. If two words are provided, it is like a piped link: the first word is the entry name, while the second serves as link text.

  • {{Wikt-lang|<lang code>|<Wiktionary entry>|<Text displayed>|i}}

The text will be italicized if the text consists of Latin letters or the language code includes the script code Latn, unless italics are turned off with |italics=- or |i=-.

Parameters

edit
Template parameters
Parameter Description
1 A code identifying the language of the text, in one of the following forms:
  • an ISO 639 language code (2 or 3 letters),
  • an ISO 639 language code and 4-letter ISO 15924 script code, separated by a hyphen,
  • a Wiktionary exceptional code, or
  • a Wikipedia code, consisting of an ISO 639 language code, an x and one or more private-use subtags, separated by hyphens, representing a language that hasn't been assigned a standard language subtag, such as cel-x-proto (Proto-Celtic).

Region and variant subtags are not supported, as it is difficult to support both them and Wiktionary language tags that contain hyphens (such as ine-pro).

2 Entry to link to on Wiktionary.
3 Optional. Text displayed, if different from the term being linked to.
italic Optional. Use |italic=no or |italic=- to disable italicization of the text.

TemplateData

edit
TemplateData documentation used by VisualEditor and other tools
See a monthly parameter usage report for Template:Wikt-lang in articles based on its TemplateData.

TemplateData for Wikt-lang

No description.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Language code1

ISO 639 language code (2 or 3 letters) representing which language the text is in

Example
'en', 'zh', 'fr', 'enm', 'la', 'sco', 'es'
Linerequired
Wiktionary entry2

Entry to link to on Wiktionary

Example
an apple a day keeps the doctor away
Stringrequired
Text displayed3

Text displayed, if different from the term being linked to

Example
an apple a day
Stringoptional
Disable italicsitalic italics i

Whether to not italicize the text

Example
no
Stringoptional

Examples

edit
  • {{Wikt-lang|en|language|languages}} → languages
  • {{Wikt-lang|ru|язы́к}} → язы́к
  • {{Wikt-lang|la|Latīnus|italic=no}} → Latīnus
  • {{Wikt-lang|la|Latīnus|i=-}} → Latīnus

Help

edit

If you try to use this template and get an error message, but can't figure out how to fix it, please go to Module talk:Wikt-lang and post a message about it.

See also

edit
  • {{Linktext}}
  • {{Lang}}
The above documentation is transcluded from Template:Wikt-lang/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Wikt-lang/sandbox&oldid=1296656614"
Last edited on 21 June 2025, at 11:12

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 21 June 2025, at 11:12 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop