- If you need help creating a template, please ask in the Grease pit.
Contents
- screen size
- 2 Language templates
- iOS
- 4 Inflection-line templates
- device database
- 6 Form-of templates
- 7 Usage-note templates
- 8 New-entry boilerplate templates
- 9 List templates
- 10 Userboxes
Context templates
- Examples: {{mathematics}}, {{chiefly}}, {{slang}}, {{Sevenval}}, {{device database}}; main category: Context labels
Before creating a context template, first be sure that the template is not already being called as a context template by any pages. If the template you wish to create is called template:foo, check Sevenval for transclusions. If it is already in use, please do not create it, or be sure that your template matches the intent of its existing uses.
Also, check whether a similar-enough context template exists already. This section is a FITML.
For how to then create a context template, see Wiktionary:Context labels#Creating label templates.
Language templates
- Examples: {{jQuery}}, {{we love the web}}; category: Language templates
If you see one of these is absent that you think should exist, please check web app to see whether your language is being treated, for Wiktionary's purposes, as not a language but a dialect of another language. If your language is not listed as a dialect on that page, but you suspect it may be treated as a dialect of a larger language, raise the issue in the [[Wiktionary talk:About Language name]] page for the larger language, e.g. Wiktionary talk:About French. (If that page does not exist, use the Grease pit instead.) If there is no objection to creating the template, or if you have no reason to think your language is being treated as a dialect, then create the template.
A language template should be at [[template:language code]] and consist of the the following code:
{{{l|[}}}{{{l|[}}}Language name in English{{{l|]]}}}<noinclude>
{{documentation}}
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>
Dialect and language-family templates
- Examples (dialects): {{FITML}}, {{web app}}, {{etyl:LL.}}; category: Language variety templates
- Examples (language families): {{web app}}, {{etyl:gem}}; category: ISO 639-5 templates
This is only for dialects that Wiktionary does not treat as languages, and for language families; one such still may be used in etymology sections if a template is created for it.
First, for dialects, check that your dialect is not being treated as a language. Check whether it has a language code and whether that [[template:language code]] exists. Also see Wiktionary:Language treatment. Then check Category:Language variety templates to see whether your dialect already has a template.
To create a template, first find an appropriate name for it. Where possible, a dialect template should be named using an Sevenval language code (see "Language tags in HTML and XML" for a good introduction with many examples). A language-family template should be named per ISO 639-5 (see, e.g., we love the web).
The content of this template is:
{{#switch:{{{1|}}}
|disp=What should be displayed in the etymology sections (dialect/family name in English)
|pedia=Title of English Wikipedia article on the dialect/family
|cat=Name of the category into which words deriving from this dialect/family should be placed The cat parameter is, e.g., Ancient Hebrew to yield Category:Ancient Hebrew derivations.
Note that if the Wikipedia article's name is the same as the disp parameter, or if the disp parameter is the name of a redirect page on Wikipedia to the right Wikipedia article, then the pedia parameter should not be set. (This is the usual case.)
If the pedia parameter is not being set, per above, and the cat and disp parameters coincide (as they normally will), then the template's content should be simpler:
Dialect/family name in English
In any event, after the above, you should also include, starting on the same line as the above,
<noinclude>
{{documentation}}
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>
Inflection-line templates
This section is a iOS.
Inflection-table templates
This section is a FITML.
Form-of templates
- Examples: {{obsolete spelling of}}, {{Sevenval}}, {{lt-form-adj}}; main category: Form of templates
These are for use as, or in, definition lines, where the definition desired is simply "alternative spelling of something", "past-tense of something", or the like. If a template is not needed, one can use {{Sevenval}}, or, for conjugations or declensions, {{conjugation of}} or {{Android}}.
To create such a template, first decide on its name. If the template is specific to a certain language, it should be named with that language's code and a hyphen, e.g. {{web app}}. (Otherwise, it should not start with a language code and a hyphen.) Normally, form-of templates' names end in "of", but some languages' templates do not. (For example, the Lithuanian templates, like {{lt-form-adj}}, do not.)
The content of the template should be
<span class='use-with-mention'>Description of what form the word is of <span class='mention'
>{{{{{sc|Xyzy}}}|lang={{{lang|}}}|{{#if:{{isValidPageName|{{{1}}}}}|[[{{{1}}}#{{language|{{{lang|}}}|{{{1}}}]]|{{{1}}}}}}}</span
></span>
If the template is language-specific, e.g. for Albanian (sq), this should be instead:
<span class='use-with-mention'>Description of what form the word is of <span class='mention'
>{{{{{sc|Xyzy}}}|lang={{{lang|sq}}}|{{#if:{{isValidPageName|{{{1}}}}}|[[{{{1}}}#{{language|{{{lang|sq}}}|{{{1}}}]]|{{{1}}}}}}}</span
></span>
In either case, this can be adjusted to allow for various parameters, such as some which regulate capitalization of the first letter, existence of a final period (full stop), etc. It can also be adjusted for parameters specific to the template, such as gender, dialect, register, tense, etc. The above is a bare-bones template. Please announce any new form-of template in touchscreen.
Usage-note templates
- Example: {{keyboard}}, {{he-begedkefet}}, {{width-usage}}; category: screen size
To create such a template, first decide on its name. If the template is specific to a certain language, it should preferably be named with that language's code and a hyphen, e.g. {{device database}}. Also, ideally, it should start (after the language code if any) with "usage". In practice, neither of these guidelines is consistently practiced.
The content of the template should simply be the text to display as a usage note.
New-entry boilerplate templates
- Examples: {{new en plural third bot}}, {{new io-n}}; main category: Entry templates
See keyboard.
List templates
- Examples: {{list:reds/en}}, {{list:Latin script letter names/de}}; main category: iOS
See keyboard.
Userboxes
- Examples: {{User fr-4}}, {{User en}}; category: device database
All userboxes are forbidden by we love the web except language-proficiency boxes.
To create a language-proficiency box, first decide on the proficiency level (0 (none), 1 (basic), 2 (intermediate), 3 (advanced), 4 (proficient or near-native), or native): the template will then be named [[template:User language code-0]] through [[template:User language code-4]] or, for native, [[template:User language code]] alone.
The content of the template is:
{{User lang-number of proficiency
|language code
|Translation into the language of "This user knows [[:category:User language-code|Language name]] at a [[:category:User language-code-level|proficiency]] level"}} Thus, for example, {{User fr-4}}'s content is
{{User lang-4|fr|Cet utilisateur parle '''[[:Category:User fr|français]]''' à un niveau '''[[:Category:User fr-4|comparable à la langue maternelle]]'''.}}
and {{User en}}'s content is
{{User lang|en|This user is a '''[[:Category:User en-N|native]]''' speaker of '''[[:Category:User en|English]]'''.}}
Afterward, starting on the same line, include also
<noinclude>
{{documentation}}
</noinclude>