Berjocht oerlis:infl

Page contents not supported in other languages.
Ut Wikiwurdboek

Documentation[bewurkje]

This template is used on inflection lines for languages that do not have specific inflection line templates.

The basic usage is:

{{infl|(lang)|(POS)|...}}

The first parameter is the language code, second is the part of speech. Then (if applicable) the inflections, paired with the inflected forms. For example, in the Sandbox:

{{infl|en|noun|plural|Sandboxes|irregular plural|Sandboxen}}

generates:

Sandbox (plural Sandboxes, irregular plural Sandboxen)

The second part of a pair may be blank, to add a descriptive term, such as uncountable or intransitive: on page 政治 (politics):

{{infl|ja|noun|uncountable||hiragana|せいじ|romaji|seiji}} and
{{infl|cmn|noun|traditional and simplified||Pinyin|zhèngzhì}}

would generate:

政治 (uncountable, hiragana せいじ, romaji seiji) and
政治 (traditional and simplified, Pinyin zhèngzhì)

(Of course in this case the ja-noun template is to be preferred for various reasons: it doesn't bold kanji forms, which makes them unreadable at the normal font size, it selects a shinjitai font, it sorts categories by hiragana, etc. Likewise for Mandarin, this entry, 政治, uses cmn-noun.)

The template also categorizes the entry in [[Category:(lang) (POS)]] if it exists, else in [[Category:(lang) language]] if it exists.

The language should have a code template: i.e. {{en}} is defined as "English". (not that one should use this for English)

Options[bewurkje]

Note that most invocations of {{infl}} should be fairly simple; if a significant language requires a complex call a large amount of the time (such as using sort= in every entry), the language should probably have its own templates.

While named options can be used anywhere, they should be after the language and POS to make it easier on bots.

  • g= one of f, m, n, c, s, p; adds the gender or number marker after the headword/pagename. g=g will add a request to supply the gender. For more than one, such as m p, also use g2=, g3=. If there are other cases, g should be the template or code desired, g={{template}}
  • head= specifies a different headword.
  • tr= specifies the transliteration of the headword
  • sort= specifies a category sort key other than the headword/pagename.
  • cat= specifies the second part of the category name if different from the POS, must be plural. (Most POS names in English take -s) The case of POS in (prefix, suffix, affix, infix) is handled by the template.
  • sc= headword script template; e.g. for Arabic, one should use sc=Arab (which see: {{Arab}})

An example, on page تايلاندي

{{infl|ar|noun|sc=Arab|g=m|tr=tailándi}}

yields:

Arabysk (tailándi) m

and the correct categorization in Category:Arabic nouns.

Notes[bewurkje]

This template should only be used when there is no language specific template. With 7000+ languages to be included in the English Wiktionary, most will never have specific templates.

  • Simple forms like {{infl}} or {{infl|it|noun|g=f}} work as expected.
  • When a template is created for a language, it is an easy task for a bot to replace infl with the language-specific template.
    For example, it is trivial to replace {{infl|en|noun|plural|foo}} with {{en-noun|pl=foo}}, a more sophisticated bot will recognize the regular forms.
  • A bot doesn't have to try to parse the language and POS headings.
  • This template makes it much simpler for a bot to generate entries for the inflected form if desired. It has the language code and the POS to use.
  • It uses the existing categories as available. If new POS categories are added, they will be used. (modulo some job-queue magic and such)
  • It automatically wikilinks its parameters if not already.
  • Presently it takes 7 parameter pairs, if more are needed look at the source, it is obvious how to add another one.
  • If the language does not have a code template, the inflection line will display properly, but the entry will not be categorized. If the code template is added later, it will (eventually) appear in the category.