Template:hi-ndecl/documentation

Parameters
Normally there is only one parameter to specify, e.g. for, on that page:

which produces

The general format is a lemma followed by angle brackets, within which are declensional properties. The lemma can be omitted when it's the same as the page title, as in the above example.

For almost all nouns, at least the gender needs to be given within angle brackets:  for masculine,   for feminine. Some nouns need additional properties, e.g., which follows the "unmarked" declension (i.e. there is no direct masculine ending to be removed; instead, endings are added onto the full lemma):

which produces

Declension
Normally, it is enough to specify the gender of a noun, and the declension will be deduced based on the ending. However, there are two cases where the same ending can have two possible declensions: 1. Masculine nouns in -ā. By default the direct plural ends in -ē and the oblique plural in -õ, which is correct for most nouns. However, some nouns, such as, have the direct plural in -ā and the oblique plural in -āõ. These "unmarked" nouns need the  indicator, as described above. 2. Feminine nouns in -iyā. By default, these are treated like any other feminine noun in -ā, with the direct plural in -āẽ and the oblique plural in -āõ. An example of such a noun is. Some such nouns, however, have the direct plural in -iyã and the oblique plural in -iyõ. An example is. These nouns need the  indicator:

which produces

Explicit term
You can explicitly specify the term to decline. This allows you, for example, to decline a term on a different page from the page of the term being declined. It is also necessary when more than one part of a term declines (see below), or when one word of a multiword term needs phonetic respelling (see multiword terms below). For example, the above declension of could be specified as follows:

Phonetic respelling
Some terms have nonstandard transliterations. This can be indicated using phonetic respelling, i.e. spell out the word phonetically in Devanagari, using virama to force no a in a given position and  to force an a in a given position. To specify this, use  followed by the phonetic respelling, e.g. for :

which produces

Here, we use phonetic respelling with a  in it to force the transliteration antarāl instead of the default antrāl.

You can also specify the transliteration directly after, but using respelling is preferred, e.g. the above could be written as

In addition, you can explicitly specify the term to decline along with the respelling, e.g. the above could also be written as

See the section on explicit terms above.

Singular-only, plural-only
Use the indicator  for singular-only nouns, and   for plural-only nouns. An example is :

which produces

Multiword terms
Multiword terms like can be declined by placing   after each word, e.g.:

which produces

Words are separated by spaces or hyphens, and  indicators apply to individual words. Words without any indicators following them are assumed to be invariable. For example, the term would be specified as follows:

or simply

since omitting the term is equivalent to specifying the page name as the term. Both produce the following:

Phonetic respelling applies to individual words. For example, for, which requires phonetic respelling of the last word, use the following:

which produces

Here only the last word is respelled.

Respelling can be used on words without indicators, for example in, where the first word is invariable and needs respelling:

which produces

Adjectival declensions
Use  after a word to indicate that it should be declined as an adjective. This is particularly useful in adjective-noun multiword terms such as :

which produces

You can use the same notation even with an adjective-noun combination is written as a single word, e.g. :

which produces

Alternations
Some nouns have more than one possible declension. An example is, which can be declined either as an "unmarked" noun in -ā (direct plural ख़लीफ़ा, oblique plural ख़लीफ़ाओं) or a regular noun in -ā (direct plural ख़लीफ़े, oblique plural ख़लीफ़ों). To specify this, use the following notation:

which produces

The general syntax is comma-separated alternatives inside of double parentheses.

There are almost no restrictions on what can be used as an alternative. The genders do not have to agree; for example, to decline the word, which can be either masculine or feminine, use the following:

which produces

It is even allowed to include a multiword term as an alternative. An example where this is useful is, where the first part can either decline or be used invariably:

which produces

Overrides
Some words are irregular in some of their forms. Syntax is provided to override the plural stem as well as individual forms.

Several words of Persian and/or Arabic origin have irregular plurals, which often function alongside regular plurals. An example is, with direct plural either or. This would be indicated as follows:
 * ((,))

which produces

[document more]