Help:Creating a template

Definition from Wiktionary, the free dictionary
(Redirected from Help:Naming templates)
Jump to: navigation, search
If you need help creating a template, please ask in the Grease pit.

Dialect templates[edit]

Examples (dialects): {{etyl:hbo}}, {{etyl:fr-CA}}, {{etyl:LL.}}; category: Etymology-only language code templates

This is only for dialects that Wiktionary does not treat as languages; 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 in Module:languages. Also see Wiktionary:Language treatment. Then check Category:Etymology-only language code 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 RFC 4646 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., wikipedia:List of ISO 639-5 codes).

The content of this template is:

|disp=What should be displayed in the etymology sections (dialect 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:Terms derived from Ancient Hebrew.

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 name in English

In any event, after the above, you should also include, starting on the same line as the above,


Form-of templates[edit]

Examples: {{obsolete spelling of}}, {{is-conjugation of}}, {{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 {{form of}}, or, for conjugations or declensions, {{conjugation of}} 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. {{is-conjugation of}}. (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'

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'

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 the Grease pit.

Usage-note templates[edit]

Example: {{en-usage-h-an}}, {{he-begedkefet}}, {{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[edit]

Examples: {{new en plural third bot}}, {{new io-n}}; main category: Entry templates

See Wiktionary:Entry templates.

List templates[edit]

Examples: {{list:reds/en}}, {{list:Latin script letter names/de}}; main category: List templates by language

See template:list/doc.


Examples: {{User fr-4}}, {{User en}}; category: Language user templates

All userboxes are forbidden by policy 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