Template:de-ndecl/documentation

Introduction
This template should be used to decline all German nouns and proper noun, in preference to any other, older template that may still exist. (Eventually these will all be eliminated.)

Masculine and neuter nouns
Generally, a single argument is supplied to the template, which specifies the gender and optionally the genitive singular and/or plural. For example, for the noun, use:

which produces

Here,  specifies the gender,   the genitive singular ending, and   the plural ending. Note that the module is smart enough to add -n onto the dative plural automatically.

Sensible defaults are provided for the genitive singular and plural. In this case, the default genitive singular for most nouns, including, adds an -s, and the default plural adds an -e, so both the genitive singular and plural could be omitted:

which has the same result as above.

If there is more than one possibility for a given ending, separate the possibilities with a colon, as with :

which produces

Because genitive singulars in either -es or -s are so common, a shortcut  is provided. Along with the default plural, the above could be equivalently written:

Other such shortcuts are  (either -s or no ending) and   (either -es or no ending).

Use  to specify a null ending, e.g. for, plural Mädchen:

which produces

Feminine nouns
Feminine nouns normally have a null ending in the genitive singular. As a result, the syntax for feminine nouns omits the genitive singular and specifies only the plural, as for, plural Ordnungen:

which produces

Feminine nouns default to the plural -en (or just -n after e), so this could equivalently be written:

Umlaut
To include umlaut, precede the ending with. For example, for, with plural Häuser, use the following:

which produces

The module knows the correct rules for umlaut, e.g. umlauts in the plural as Äpfel:

which produces

Since -s is the default genitive ending in most cases, this could equivalently be written:

Weak nouns
Additional modifiers beyond the gender, genitive singular and plural are known as indicators. These are specified following a period. One common indicator is, indicating a weak noun, e.g. :

an which produces

The code will automatically add -n in place of -en if the noun ends in -e. However, if the noun has -n in place of -en after a consonant, as with, , and their compounds, use. For example, one of the declensions of could be indicated as follows:

which produces

If the noun has -n in the singular but -en in the plural, as is typical for and its compounds, specify the plural explicitly, as follows:

which produces

For nouns with multiple possible declensions, e.g. weak or strong, use the alternant notation, as described below. For example,, which can be declined either strong or weak, might be indicated as follows:

which produces

The general syntax here is to surround each declension with angle brackets, separate them with commas and put double parens around the whole thing. More than two alternants are possible; e.g. for, which can be either strong, weak with genitive in -n or weak with genitive in -en, use the following:

which produces

In this case, the plural is always in -n, so the alternants that would by default produce other plurals must have the plural given explicitly.

Additional indicators
Besides  and , other supported indicators are as follows:
 * : singular-only
 * : indicate that the term is normally used with the definite article
 * : don't add -n onto the dative plural when it normally would be added
 * : change -ß to -ss before an ending beginning with a vowel (as is common in pre-1996 spellings)
 * : include dative variant in -e with footnote even if no genitive with -e- exists; see below

Examples:

1.  for singular-only, e.g. :

which produces

2.  for nouns normally used with the definite article, e.g. :

which produces

This indicator is especially useful in the headword template, e.g.:

which produces

3.  to suppress the final -n in the dative plural after a final -e, -er or -el, e.g. :

which produces

4.  to indicate that a final -ß changes to -ss before an ending beginning with a vowel (for pre-1996 spellings), e.g.  (superseded spelling):

which produces

5.  to explicitly include the dative variant in -e with footnote even if no genitive with -e- exists, e.g. for :

which produces

Note that by default the variant in -e with associated footnote appears whenever a genitive form includes an -e- in it (genitive is specified as,   or  ). To suppress its appearance, as in recently-coined words, use the override  (see Overrides below).

Irregular genitives and plurals
If the genitive or plural are sufficiently irregular, they cannot be specified using an ending and/or the use of  to indicate umlaut. In those cases, specify the full form, e.g. for with plural Vakua or Vakuen:

which produces

Note that the default plural of neuter nouns in -um changes the -um to -en (see below), so the following would equivalently work:

Here,  explicitly requests the default.

A full form is recognized as such by beginning with a capital letter. In the rare case where a full form must be given and begins with a lowercase letter, precede the full form with. For example, for (alternative letter-case form of ), use:

which produces

Angle-bracket notation
An alternative notation is available, which specifies the lemma explicitly along with the declension. E.g. for, the following could be used:

Since the lemma here is the same as lemma attached to the angle brackets, it can be omitted:

Both notations are equivalent to the following:

For single-word terms, angle brackets aren't usually needed, but they become necessary with multiword expressions and alternants; see below.

Default genitive and plural algorithms
The following algorithm produces the default genitive singular:
 * 1) If the noun is feminine, use a null ending.
 * 2) Otherwise, if the noun is weak, use -n after -e, -nen after consonant + -in, and otherwise -en.
 * 3) Otherwise, if the noun ends in -nis (neuter like, , etc. or occasional masculine like ), use -ses.
 * 4) Otherwise, if the noun ends in a consonant + -us, use a null ending, as in, , , etc.
 * 5) Otherwise, if the noun ends in s/ß/x/z, use -es.
 * 6) Otherwise, use -s.

The following algorithm produces the default plural:
 * 1) If the noun ends in -nis (neuter like  or, feminine like  or , or occasional masculine like ), use -se.
 * 2) Otherwise, if the noun is feminine or weak, use -n after -e, -nen after consonant + -in, and otherwise -en.
 * 3) Otherwise, if the noun ends in -e, use -n.
 * 4) Otherwise, if the noun is neuter and ends in -lein, use a null ending.
 * 5) Otherwise, if the noun is neuter and ends in -um (e.g.  or ), replace the -um with -en.
 * 6) Otherwise, if the noun ends in -mus (e.g.  or ), replace the -mus with -men.
 * 7) Otherwise, if the noun ends in a consonant + -us (e.g., , ), use -se.
 * 8) Otherwise, if the noun ends in -el, -em, -en or -er (e.g., , ), use a null ending. (But this does not apply to nouns in a consonant + -eer/-ier, -eel/-iel, etc., as in , , , which default to -e as below.)
 * 9) Otherwise, use -e.

Nouns with multiple genders
If a noun has more than one possible gender, separate the genders with a colon, e.g. :

which produces

You can also place a footnote/qualifier in brackets after a given gender. For example, is neuter mainly in Austria; to note this, use the following:

Gender qualifiers do not appear in the declension table, but they do appear in the headword, which is specified like this:

which produces

Plural-only nouns
To specify a plural-only noun, use  in place of the gender, e.g. for :

which produces

With plural-only nouns, you cannot specify a genitive or plural form, and if you do so, an error will result.

Overrides
You can override a particular case/number combination using the form, where   specifies the particular slot to override, e.g.   for accusative singular,   for dative plural. For example, for the noun, whose plural is Häusle and whose dative plural can be either Häuslen or Häusle, use the following:

which produces

Another use of overrides is specifying a distinct genitive for feminine nouns. An example is, which has an alternative Latinate genitive singular Quinquagesimä, used mostly when no article is present. Specify as follows:

which produces

Here, we specify a footnote in brackets, as described in the Footnotes section above. For another example of using a footnote with an override, see the declension of below.

Recognized slot names are as follows:

The ablative and vocative cases are used only in certain terms with special Latinate declensions, e.g..

Defective forms
If a given form is missing entirely, use  to indicate this. An example is, which is missing the genitive singular. Indicate as follows:

which produces

When used in the headword, it displays as follows:

However, for nouns without a plural form,  should be used instead of.

Embedded commas and periods
If you need to include a form that contains an embedded comma or period, precede the comma or period with a backslash. For example, for (abbreviation of ), with plural either Vf. or Vff., use the following:

which produces

Multiword expressions
To decline a multiword expression, include the text of the expression in 1 and put the spec for each word after the word, surrounded by angle brackets. For example, for :

which produces

Another example, for :

which produces

It is not necessary to surround each word with brackets, but when used in it ensures that the words are individually linked in the headword.

Arbitrary specs can be included inside of angle brackets, e.g. for :

which produces

For singular-only nouns, include the indicator  inside the angle brackets, as for :

which produces

Any number of declined components can be included, and will be handled correctly. An example with three is :

which produces

Adjectival nouns and adjective-noun combinations
Some nouns are declined like adjectives. An example is (definite nominative der Erwachsene, indefinite nominative ein Erwachsener, definitive genitive des Erwachsenen, bare plural Erwachsene, definite plural die Erwachsenen, etc.). To indicate this, put a  in place of the declension:

which produces

The headword appears as follows:

Note how the declension table includes strong (i.e. bare), weak (i.e. definite) and mixed (i.e. indefinite) forms, and the headword includes both bare and definite versions of the nominative singular, genitive singular and nominative plural. For masculine and neuter nouns like this, the bare and definite genitive have the same ending and so the headword inflection combines the two, but for feminine nouns, they will be split. An example is :

which produces

The headword appears as follows:

You can likewise decline adjective-noun combinations using, e.g. :

which produces

The headword appears as follows:

Here, the alternative notation using angle brackets must be used to indicate the declensions of the individual words. Links must be included in order for there to be links to individual words in the headword.

Note that the gender does not need to be specified in conjunction with, because it can automatically be inferred from the ending. When used in conjunction with a noun, the plural status of the adjective does not need to be given either, as with :

which produces

The headword appears as follows:

However, this won't work for a plural-only adjectival noun, because the -e ending will be inferred as feminine singular. If for some reason you need to specify such a noun, use  or , e.g. for :

which produces

The headword appears as follows:

Alternants
Sometimes a given expression has multiple possible declensions, in a way that can't easily be specified using the available possibilities for specifying multiple genders or alternative genitive or plural endings. For example, some nouns can be declined either strong or weak, and in some multiword expressions, one word may or may not be declined. An example is, normally strong but sometimes weak (especially in Southern Germany and Austria). To indicate this, use a syntax like this:  where each alternant must have angle brackets in it:

which produces

Here the first alternant is strong while the second is weak and includes an entire-declension footnote (see Footnotes above). The headword appears as follows:

Another example is, where lüttje (a Low German word) may or may not be inflected as a normal adjective:

which produces

The headword appears as follows:

Note that both the declension and headword use the adjectival form even though only one of the two alternants has an adjective in it. This is also an example where we purposely avoid linking one of the components, since lüttje by itself is not a German word.