Template:compound/documentation

This template is used in the etymology section to display etymologies for compound terms: words that are made up of multiple parts. For more about compounds in etymologies, see.

is only used when two or more independent words are joined, without modification. In other cases, please use the following alternatives:
 * For most cases involving prefixes, suffixes or interfixes, use, which supports arbitrary combinations of affixes along with independent words. In fact can be used in place of.
 * For combinations involving both a prefix and a suffix (no base word), use instead.
 * For combinations of independent words where the result is not just concatenation, as in, use instead.

For combinations involving an affix added to two or more base words, if possible show the intermediate form (affix added to single base word, or compound of base words with affix already included). If the implied intermediate form is not used, use, including the affix as one component, and manually list the affix category. For example, is composed of  +, not *( +  + ), since the intermediate form  is used, or *( + ), since  is a backformation.

This template uses Module:affix as a back-end. This module, in turn, uses Module:links to link each part of the compound, so that it supports all the features in that module.

Usage
The most basic usage is as follows:

For instance, a simple etymology of could be created with:

which evaluates to:

It also adds the entry to Category:English compound terms.

Parameters
The language code (see Languages) is given with the first positional parameter, and the script code (see Scripts) optionally with. The script can be detected if not provided, so it's rarely needed.

In principle, all parameters that are present in and  are also supported by this template. Parameters that apply to the individual words in the compound are suffixed with a number, which matches the position where the part appears (the number of the positional parameter). So  becomes ,  ,   and so on. Parameters which in and  are positional (the alternative display form of the term, and the gloss) are given named parameters with matching numbers. The following are supported:


 * 1
 * the language where the compound got formed.


 * 1
 * disables the categorization. This parameter needs to be used when the template is used in a language that is not 1.


 * alt1, alt2 …
 * Alternative display form of each part. Because Module:links will strip diacritics from a word when appropriate, this may not always be needed.


 * tr1, tr2 …
 * Transliteration of each part.


 * t1, t2 …
 * Translation gloss for each part


 * pos1, pos2 …
 * Part-of-speech gloss for each part.


 * type
 * Type of compound, e.g. bahuvrihi or alliterative. See Template:affix/documentation. If this parameter is given, extra text is generated before the listed parts (e.g.  compound of FOO + BAR), and the page is placed in an additional category (e.g. Category:Hindi bahuvrihi compounds).


 * 1
 * Do not capitalize the first letter of the extra text generated by type.


 * 1
 * When type is used, do not generate the extra text that is normally placed before the listed parts. The page will still be placed in the additional type-specific category unless 1 is given.

Example
The above code would be used on the Dutch entry to explain the origin of the West Frisian word  without also placing the Dutch entry in Category:West Frisian compound terms.

TemplateData
{	"params": { "1": {			"label": "language code", "type": "string", "required": true, "aliases": [ "lang" ],			"description": "the 2- or 3-letter language code for the current section", "example": "en" },		"2": {			"label": "first part", "example": "place", "type": "wiki-page-name", "description": "the prefixed part of the compound word", "required": true },		"3": {			"label": "second part", "example": "holder", "type": "wiki-page-name", "description": "the suffixed part of the compound word", "required": true },		"4": {			"label": "third part", "type": "wiki-page-name", "description": "optional 3rd, 4th, ... parts of the compound word using params 4, 5, ..." },		"5": {			"label": "fourth part", "type": "wiki-page-name", "description": "optional 3rd, 4th, ... parts of the compound word using params 4, 5, ..." }	},	"description": "This template is used in the etymology section to display etymologies for compound terms: words that are made up of multiple parts. For more about compounds in etymologies, see Etymology: Compounds.", "format": "inline" }

fa:الگو:مرکب fr:Modèle:compos gu:ઢાંચો:સંયોજન ja:テンプレート:compound