Template:form of: difference between revisions

Definition from Wiktionary, the free dictionary
Jump to: navigation, search
(change ifexist to if isValidPageName per talk)
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}|<span class='use-with-mention'>{{#if:{{{nocap|}}}|{{{1}}}|{{ucfirst:{{{1}}}}}}} of <span class='mention'>{{{{#if:{{{sc|}}}|{{{sc}}}|Xyzy}}|{{#ifexist:{{{2}}}|[[{{{2}}}#{{{lang|English}}}|{{{3|{{{2}}}}}}]]|{{{2}}}}}|lang={{{lang|en}}}}}</span>{{#if:{{{tr|}}}|&#32;({{{tr}}})}}{{#if:{{{nodot|}}}||.}}</span>|<span class='use-with-mention'><span class='mention'>[[{{{1}}}#{{{lang|English}}}|{{#if:{{{sc|}}}|{{{{{sc}}}|{{{alt|{{{1}}}}}}}}|{{{alt|{{{1}}}}}}}}]]</span></span>{{#if:{{{tr|}}}|&#32;({{{tr}}})}}}}</includeonly>{{#ifeq:{{NAMESPACE}}|Template|[[Category:Form of templates|{{PAGENAME}}]]}}<noinclude>{{documentation}}</noinclude>
+
<includeonly>{{#if:{{{2|}}}|<span class='use-with-mention'>{{#if:{{{nocap|}}}|{{{1}}}|{{ucfirst:{{{1}}}}}}} of <span class='mention'>{{{{#if:{{{sc|}}}|{{{sc}}}|Xyzy}}|{{#if:{{isValidPageName|{{{2}}}}}|[[{{{2}}}#{{language|{{{lang|en}}}}}|{{{3|{{{2}}}}}}]]|{{{2}}}}}|lang={{{lang|en}}}}}</span>{{#if:{{{tr|}}}|&#32;({{{tr}}})}}{{#if:{{{nodot|}}}||.}}</span>|<span class='use-with-mention'><span class='mention'>[[{{{1}}}#{{{lang|English}}}|{{#if:{{{sc|}}}|{{{{{sc}}}|{{{alt|{{{1}}}}}}}}|{{{alt|{{{1}}}}}}}}]]</span></span>{{#if:{{{tr|}}}|&#32;({{{tr}}})}}}}</includeonly>{{#ifeq:{{NAMESPACE}}|Template|[[Category:Form of templates|{{PAGENAME}}]]}}<noinclude>{{documentation}}</noinclude>

Revision as of 18:36, 15 July 2010


The following documentation is located at Template:form of/documentation. [edit]


This is the most general of the form-of templates. It can be used to apply the correct styling of the definition line to any description as the first parameter.

Use this template for forms that don't fit the mold. For instance, the zeroeth-person plural subjunctive of a highly unusual word. If there is already another template available, it's preferred to use that instead. This template should not be used in other templates, only directly in entries.

Parameters

This template takes the same general parameters as {{term}}, and it uses the same post-processing on the parameters. This includes script detection, removing diacritics, processing embedded links, and so on.

1=
The definition to display, without the "of" at the end.
2=
The term to be linked to.
3=
Alternate text to display as the link title, if different from the term.
4=
A gloss or short translation of the word.
tr=
Transliteration for non-Latin-script words, if different from the automatically-generated one.
lang=
The language code of the desired target link.
sc=
Script code to use, if script detection does not work.

Examples

{{form of|alternative form|word|lang=en}}

alternative form of word

{{form of|alternative form|word link|link name|lang=en}}

alternative form of link name