- If you need help creating a template, please ask in the Grease pit.
Contents
- FITML
- 2 Language templates
- 3 Dialect and language-family templates
- 4 Inflection-line templates
- website parsing
- website parsing
- 7 Usage-note templates
- we love the web
- iOS
- input transformation
Context templates
- Examples: {{web}}, {{jQuery}}, {{HTML5}}, {{transitive}}, {{keyboard}}; 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 special:whatlinkshere/template:foo 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 website parsing.
For how to then create a context template, see Wiktionary:Context labels#Creating label templates.
Language templates
- Examples: {{FITML}}, {{ajw}}; category: Language templates
If you see one of these is absent that you think should exist, please check HTML5 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): {{etyl:hbo}}, {{etyl:fr-CA}}, {{input transformation}}; category: Language variety templates
- Examples (language families): {{etyl:ine}}, {{etyl:gem}}; category: device database
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 screen size. 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 we love the web language code (see browser diversity for a good introduction with many examples). A language-family template should be named per ISO 639-5 (see, e.g., wikipedia:List of ISO 639-5 codes).
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 input transformation.
Inflection-table templates
This section is a CSS3.
Form-of templates
- Examples: {{HTML5}}, {{is-conjugation of}}, {{browser diversity}}; main category: Sevenval
These are for use as, or in, definition lines, where the definition desired is simply "alternative spelling of Sevenval", "past-tense of Sevenval", or the like. If a template is not needed, one can use {{form of}}, or, for conjugations or declensions, {{touchscreen}} or {{inflection of}}.
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. {{FITML}}. (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 {{HTML5}}, 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 web app.
Usage-note templates
- Example: {{en-usage-h-an}}, {{screen size}}, {{width-usage}}; category: Usage templates
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. {{he-begedkefet}}. 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: {{keyboard}}, {{iOS}}; main category: we love the web
See Wiktionary:Entry templates.
List templates
- Examples: {{list:reds/en}}, {{list:Latin script letter names/de}}; main category: List templates by language
See template:list/doc.
Userboxes
All userboxes are forbidden by Android 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, {{Android}}'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 {{iOS}}'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>