| |
(2 intermediate revisions by one user not shown) |
Line 5: | Line 5: |
| This template shows the term or phrase (optionally linked) in the appropriate font (user-customizable for Latin/Roman script mentions), along with its transliteration and English gloss translation, if any. | | This template shows the term or phrase (optionally linked) in the appropriate font (user-customizable for Latin/Roman script mentions), along with its transliteration and English gloss translation, if any. |
| | | |
− | <nowiki>From {{term|word|lang=en}} + ...</nowiki> | + | <nowiki>{{term|word|lang=en}}</nowiki> |
− | <nowiki>From {{term|verbo|verbō|lang=la}} + ...</nowiki> | + | <nowiki>{{term|verbum|verbō|lang=la}}</nowiki> |
− | <nowiki>From {{term|verbo|verbō|for the word|lang=la}} + ...</nowiki> | + | <nowiki>{{term|verbum|verbō|for the word|lang=la}}</nowiki> |
− | <nowiki>From {{term|word||unit of speech|lang=en}} + ...</nowiki> | + | <nowiki>{{term|word||unit of speech|lang=en}}</nowiki> |
− | <nowiki>From {{term|λόγος|tr=lógos|lang=grc}} + ...</nowiki> | + | <nowiki>{{term|λόγος|tr=lógos|lang=grc}}</nowiki> |
− | <nowiki>From {{term|λόγος|tr=lógos||word|lang=grc}} + ...</nowiki> | + | <nowiki>{{term|λόγος|tr=lógos||word|lang=grc}}</nowiki> |
− | <nowiki>From {{term|mot|lang=fr}} + ...</nowiki> | + | <nowiki>{{term|mot|lang=fr}}</nowiki> |
− | <nowiki>From {{term||[[cor#Latin|Cor]] [[Carolus#Latin|Carolī]]|Charles' heart|lang=la}} + ...</nowiki> | + | <nowiki>{{term|[[cor|Cor]] [[Carolī]]|Charles' heart|lang=la}}</nowiki> |
| | | |
− | :From {{term|word|lang=en}} + ... | + | :{{term|word|lang=en}} |
− | :From {{term|verbo|verbō|lang=la}} + ... | + | :{{term|verbum|verbō|lang=la}} |
− | :From {{term|verbo|verbō|for the word|lang=la}} + ... | + | :{{term|verbum|verbō|for the word|lang=la}} |
− | :From {{term|word||unit of speech|lang=en}} + ... | + | :{{term|word||unit of speech|lang=en}} |
− | :From {{term|λόγος|tr=lógos|lang=grc}} + ... | + | :{{term|λόγος|tr=lógos|lang=grc}} |
− | :From {{term|λόγος|tr=lógos||word|lang=grc}} + ... | + | :{{term|λόγος|tr=lógos||word|lang=grc}} |
− | :From {{term|mot|lang=fr}} + ... | + | :{{term|mot|lang=fr}} |
− | :From {{term||[[cor#Latin|Cor]] [[Carolus#Latin|Carolī]]|Charles' heart|lang=la}} + ... | + | :{{term|[[cor|Cor]] [[Carolī]]|Charles' heart|lang=la}} |
| | | |
| ===Parameters=== | | ===Parameters=== |
− | In principle, the language of the term should always be specified, even for English, using <tt>lang=</tt> with the [[:Category:Language code templates|(ISO 639) language code]]. This ensures that the link points to the right section, and also includes the proper script and formatting conventions for the language in question. | + | In principle, the language of the term should always be specified, even for English, using <code>lang=</code> with the [[:Category:Language code templates|(ISO 639) language code]]. This ensures that the link points to the right section, and also includes the proper script and formatting conventions for the language in question. |
| | | |
| For a simple link, to a Wiktionary entry, use positional parameter 1: | | For a simple link, to a Wiktionary entry, use positional parameter 1: |
− | :<code><nowiki>From {{term|word|lang=en}} + ...</nowiki></code> | + | :<code><nowiki>{{term|word|lang=en}}</nowiki></code> |
− | :From {{term|word|lang=en}} + ... | + | :{{term|word|lang=en}} |
− | :<code><nowiki>From {{term|mot|lang=fr}} + ...</nowiki></code> | + | :<code><nowiki>{{term|mot|lang=fr}}</nowiki></code> |
− | :From {{term|mot|lang=fr}} + ... | + | :{{term|mot|lang=fr}} |
| | | |
| If the mentioned term or phrase should also show alternate text, use positional parameter 2: | | If the mentioned term or phrase should also show alternate text, use positional parameter 2: |
− | :<code><nowiki>From {{term|verbo|verbō|lang=la}} + ...</nowiki></code> | + | :<code><nowiki>{{term|verbum|verbō|lang=la}}</nowiki></code> |
− | :From {{term|verbo|verbō|lang=la}} + ... | + | :{{term|verbum|verbō|lang=la}} |
| | | |
| If the mentioned term or phrase should be followed by an English gloss translation, use positional parameter 3: | | If the mentioned term or phrase should be followed by an English gloss translation, use positional parameter 3: |
− | :<code><nowiki>From {{term|verbo|verbō|for the word|lang=la}} + ...</nowiki></code> | + | :<code><nowiki>{{term|verbum|verbō|for the word|lang=la}}</nowiki></code> |
− | :From {{term|verbo|verbō|for the word|lang=la}} + ... | + | :{{term|verbum|verbō|for the word|lang=la}} |
| | | |
− | If the mentioned term needs clarification, use named parameter <tt>pos=</tt> for the part of speech, <tt>lit=</tt> for the literal translation, or both. <tt>pos=</tt>'s values are abbreviations of the part-of-speech names ([[template:pos a|''a'']], [[template:pos adv|''adv'']], [[template:pos int|''int'']], [[template:pos n|''n'']], [[template:pos pron|''pron'']], [[template:pos v|''v'']], [[template:pos vi|''vi'']], [[template:pos vt|''vt'']], or [[template:pos vti|''vti'']]) or any text: | + | If the mentioned term needs clarification, use named parameter <code>pos=</code> for the part of speech, <code>lit=</code> for the literal translation, or both. <code>pos=</code>'s values are abbreviations of the part-of-speech names ([[template:pos a|''a'']], [[template:pos adv|''adv'']], [[template:pos int|''int'']], [[template:pos n|''n'']], [[template:pos pron|''pron'']], [[template:pos v|''v'']], [[template:pos vi|''vi'']], [[template:pos vt|''vt'']], or [[template:pos vti|''vti'']]) or any text: |
| :<code><nowiki>From {{term|deus ex machina|deus ex māchinā|device|pos=n|lit=god from a device|lang=la}}</nowiki></code> | | :<code><nowiki>From {{term|deus ex machina|deus ex māchinā|device|pos=n|lit=god from a device|lang=la}}</nowiki></code> |
| :From {{term|deus ex machina|deus ex māchinā|device|pos=n|lit=god from a device|lang=la}} | | :From {{term|deus ex machina|deus ex māchinā|device|pos=n|lit=god from a device|lang=la}} |
Line 50: | Line 50: |
| :From {{term|word||unit of speech|lang=en}} + ... | | :From {{term|word||unit of speech|lang=en}} + ... |
| | | |
− | If the mentioned term or phrase is not attested, but reconstructed based on other evidence, do not use this template. Use {{temp|recons}} instead, which operates identically: | + | If the mentioned term or phrase is not attested, but reconstructed based on other evidence, put a "*" before the term: |
− | :<code><nowiki>Proto-Indo-European {{recons|bʰer-||to carry|lang=ine-pro}}.</nowiki></code> | + | :<code><nowiki>Proto-Indo-European {{term|*bʰer-||to carry|lang=ine-pro}}.</nowiki></code> |
− | :Proto-Indo-European {{recons|bʰer-||to carry|lang=ine-pro}}. | + | :Proto-Indo-European {{term|*bʰer-||to carry|lang=ine-pro}}. |
| | | |
− | If the mentioned term or phrase is written in a non-Roman script, you do not need to do anything special. As long as the language code is specified (which it should always be), the script will automatically set to whatever the default script is for that language. Be sure to include a Latin script transliteration (Romanization) using the <tt>tr=</tt>: | + | If the mentioned term or phrase is written in a non-Roman script, you do not need to do anything special. As long as the language code is specified (which it should always be), the script will automatically set to whatever the default script is for that language. Be sure to include a Latin script transliteration (Romanization) using the <code>tr=</code>: |
| :<code><nowiki>From {{term|λόγος|tr=lógos|lang=grc}} + ...</nowiki></code> | | :<code><nowiki>From {{term|λόγος|tr=lógos|lang=grc}} + ...</nowiki></code> |
| :<code><nowiki>From {{term|λόγος|tr=lógos||word|lang=grc}} + ...</nowiki></code> | | :<code><nowiki>From {{term|λόγος|tr=lógos||word|lang=grc}} + ...</nowiki></code> |
Line 60: | Line 60: |
| :From {{term|λόγος|tr=lógos||word|lang=grc}} + ... | | :From {{term|λόγος|tr=lógos||word|lang=grc}} + ... |
| | | |
− | Sometimes it may be necessary to override the default script, for example with languages that use more than one script. Use the named parameter <tt>sc=</tt> to indicate the [[w:ISO 15924|ISO 15924]] script code ([[w:List of ISO 15924 codes|list]]) or any other [[:Category:Script code templates|script code template]]: | + | Sometimes it may be necessary to override the default script, for example with languages that use more than one script. Use the named parameter <code>sc=</code> to indicate the [[w:ISO 15924|ISO 15924]] script code ([[w:List of ISO 15924 codes|list]]) or any other [[:Category:Script code templates|script code template]]: |
| :<code><nowiki>From {{term|риба|ри̏ба|tr=rȉba|sc=Cyrl|fish|lang=sh}} + ...</nowiki></code> | | :<code><nowiki>From {{term|риба|ри̏ба|tr=rȉba|sc=Cyrl|fish|lang=sh}} + ...</nowiki></code> |
| From {{term|риба|ри̏ба|tr=rȉba|sc=Cyrl|fish|lang=sh}} + ... | | From {{term|риба|ри̏ба|tr=rȉba|sc=Cyrl|fish|lang=sh}} + ... |
| | | |
| To customize the wikilinks, omit the first parameter and write the wikilink markup in the second parameter. | | To customize the wikilinks, omit the first parameter and write the wikilink markup in the second parameter. |
− | :<code><nowiki>From {{term||[[cor#Latin|Cor]] [[Carolus#Latin|Carolī]]|Charles' heart|lang=la}} + ...</nowiki></code> | + | :<code><nowiki>{{term|[[cor|Cor]] [[Carolī]]|Charles' heart|lang=la}}</nowiki></code> |
− | :From {{term||[[cor#Latin|Cor]] [[Carolus#Latin|Carolī]]|Charles' heart|lang=la}} + ... | + | :{{term|[[cor|Cor]] [[Carolī]]|Charles' heart|lang=la}} |
− | | |
− | Occasionally it may be useful to create a link to a section other than that of a language. To do this, use <tt>#section</tt> syntax like above. As this negates the benefits of using language codes, this practice is somewhat discouraged. | |
− | :<code><nowiki>From {{term||[[word#Verb|word]]|lang=en}} + ...</nowiki></code> | |
− | :From {{term||[[word#Verb|word]]|lang=en}} + ... | |
| | | |
| ===Customization=== | | ===Customization=== |
Line 83: | Line 83: |
| * {{temp|l}} for creating links | | * {{temp|l}} for creating links |
| * {{temp|lang}} to tag language only | | * {{temp|lang}} to tag language only |
− | * {{temp|term/t}}, Lua-ized version | + | * {{temp|term/t}} / {{temp|M}} |
| | | |
| <includeonly> | | <includeonly> |
Use this template to mention a term or phrase within running text (e.g. in ===Etymology=== and ====Usage notes==== sections). Use {{l}}
instead in lists or heads to avoid italicizing.
This template shows the term or phrase (optionally linked) in the appropriate font (user-customizable for Latin/Roman script mentions), along with its transliteration and English gloss translation, if any.
In principle, the language of the term should always be specified, even for English, using lang=
with the (ISO 639) language code. This ensures that the link points to the right section, and also includes the proper script and formatting conventions for the language in question.
If the mentioned term or phrase should also show alternate text, use positional parameter 2:
If the mentioned term or phrase should be followed by an English gloss translation, use positional parameter 3:
Note that the second numbered parameter can be omitted, even when showing the gloss:
If the mentioned term or phrase is not attested, but reconstructed based on other evidence, put a "*" before the term:
If the mentioned term or phrase is written in a non-Roman script, you do not need to do anything special. As long as the language code is specified (which it should always be), the script will automatically set to whatever the default script is for that language. Be sure to include a Latin script transliteration (Romanization) using the tr=
:
Sometimes it may be necessary to override the default script, for example with languages that use more than one script. Use the named parameter sc=
to indicate the ISO 15924 script code (list) or any other script code template:
To customize the wikilinks, omit the first parameter and write the wikilink markup in the second parameter.
Further, the default style of the subsequent English translation glosses is in double quotes (pending a vote to approve this template). Readers can easily change the output to single quotes by selecting "Show English glosses for mentioned terms in single quotes" from WT:PREFS.