قالب:Wikt-lang
Uses Lua: |
قوالب اللغات |
---|
أسماء اللغات (ISO 639) |
|
روابط الإنترويكي |
نصوص بلغات أجنبية |
|
غيرهم |
Usage
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|en|language|languages}} |
→ | languages: | links to the entry for language |
The module automatically determines the correct Wiktionary entry by removing italics or bolding, and removing or replacing diacritical marks and letters that are not used in entry names on 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.
{{wikt-lang|ru|язы́к}} |
→ | язы́к | links to the entry for язык |
{{wikt-lang|la|Latīnus}} |
→ | Latīnus | links to the entry for Latinus |
{{wikt-lang|la|Latīnus|i=-}} |
→ | Latīnus | links to the entry for Latinus |
{{wikt-lang|grc|δημοκρατίᾱ}} |
→ | δημοκρατίᾱ | both of these link to the entry for δημοκρατία |
{{wikt-lang|grc|'''δημο'''''κρατ''ίᾱ}} |
→ | δημοκρατίᾱ | |
{{wikt-lang|ar|العَرَبِيَّة}} |
→ | العَرَبِيَّة | links to the entry for العربية |
{{wikt-lang|ine-pro|bʰéreti}} |
→ | bʰéreti |
Only tags consisting of a language subtag, or a language subtag–private use subtag combination that represents a language that hasn't been assigned a language subtag, such as cel-x-proto
(Proto-Celtic), are supported. Script, region, or variant subtags are not supported, as it is difficult to support both them and Wiktionary language tags that contain hyphens (such as ine-pro
above).
Help
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:Language and post a message about it.
See also
TemplateData
Wikt-lang
لا وصف.
وسيط | وصف | نوع | حالة | |
---|---|---|---|---|
Language code | 1 | ISO 639 language code (2 or 3 letters) representing which language the text is in
| سطر | مطلوب |
Wiktionary entry | 2 | Entry to link to on Wiktionary
| نص | مطلوب |
Text displayed | 3 | Text displayed, if different from the term being linked to
| نص | اختياري |
italicize? | i italic italics | Whether to italicize the text
| نص | اختياري |
The above documentation is transcluded from قالب:Wikt-lang/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |