Template:DisplayTranslations/doc

The purpose of this template, DisplayTranslations, is to display a set of related translations tabularly.

Usage
The template is invoked with up to forty (40) language-translation parameter pairs as follows:



Where:
 * Language1 and Language2 represent English-language names such as "Arabic," "German," "Japanese" and "Russian"
 * Translation1 and Translation2 represent translated text such as "منزل" (Arabic), "haus" (German), "ja:家屋" (Japanese) and "Дом" (Russian) (all of these terms being translations of the English word "house")

Table-configuration parameters (optional)
The following table-configuration parameters are optional:
 * title - the title of the template (Default: "Translations")
 * bordercolor - the border's color (Default: Peru)
 * borderwidth - the border's width (Default: 1px)
 * collapsible - exposes "Hide|Show" field to make sidebar collapsible into its header (Default: NULL [feature disabled])
 * fontsize - table's overall font size (Default: 85%)
 * headercolor - the header & footer's background color (Default: Wheat)
 * headertextcolor - the header & footer's text color (Default: Maroon)
 * rowcolor - the in-row background color (Default: Cornsilk)
 * rowtextcolor - the in-row text color (Default: black)

For example, for the article Dharma (Buddhism), to override this template's default title of "Translations", you could write:

which would produce the following title:

Note that, whereas the translated-text field parameters take pairs of parameters, such as:


 * | Pali | dhamma

these table-configuration parameters are singular parameters that have values associated with them, such as:


 * | rowtextcolor=Magenta

Caveats about the "collapsible" parameter

 * The "collapsible" parameter can be set to ANYTHING (typically, "collapsible=1" but also "collapsible=TRUE" as well as "collapsible=FALSE") in order to activate this feature.
 * If you activate the collapsible feature, the "Hide|Show" field might force your title to move off-center. One way to accommodate this is to start the title field with a break  character, as in " title=     Dharma translated ", thus having the title start on the line immediately after the one occupied by the "Hide|Show" field.

Example
The sidebar to the right is generated by the following:



To increase readability for future editing or expansion, this invocation could also be formatted in this way:



Using Template:Unicode with "text" parameters
When passing text strings that use Unicode characters that are not in the ISO/IEC 8859-1 ("Latin-1") character set, and legacy support for older systems is a priority for you, you may optionally pass Template:Unicode as a text string.

Due to improved support for Unicode on all computers being sold today, the need to explictly declare that you are using Unicode is waning. The committee responsible for 8-bit character sets was disbanded in 2004 due to the widespread adoption of Unicode, and since then virtually all computer software manufacturers have been working to transparently support Unicode on their systems. The standard Wikipedia editor's interface provides commonly-used Unicode characters as clickable insertions, for example.

If you wish to explicitly specify Unicode you may do so as follows:



or, using Template:Unicode:



These would correctly result in the following row being displayed:

Using Template:IAST with "text" parameters for Devanagari transliteration
Devanagari is a writing system used for several Indic languages such as Hindi, Marathi, Nepali, Sanskrit, and others. Because there are several incompatible methods for romanizing Devanagari sometimes it can be helpful to specify which romanization method is being used for those languages. IAST is the current academic standard for romanization of Devanagari.

If you have used IAST for your romanization and wish to encode that fact in your string you may optionally pass Template:IAST as a text string. This feature may assist bots in identifying IAST romanizations.

Using the template as follows will not display as you may expect:



Doing that will result in an error because the WP ParserFunctions will incorrectly parse the pipe (|) within the  template as being a pipe for the  template. Thus, one must use the "pipe escape" (Template:!) function as follows:



This would correctly result in the following row being displayed:

Note that Template:IAST does not explicitly alert older computers that Unicode is being used, so it does not address display issues with Unicode on those systems.

The "language" parameter's article-piping
In order for the specified language to link to an appropriate language-specific page, there must be an existing article (or redirect to an article) with the title of "Language_language". Thus, for instance, if "Klingon" is specified as a language parameter then there must be an existing Klingon_language page for this template to generate an appropriate language-specific link.

The "translation" parameter's article-piping
When specifying the translated-text parameter (such as, "דהרמה" and "법보" which are respectively Hebrew and Korean for "dharma"), if you know that there is a language-specific WP article for that translated text (such as, he:דהרמה and ko:법보), then you could pass the translated-text parameter with the language-specific piping (such as, דהרמה and 법보  which display as דהרמה and 법보). Note that, for WP articles (as opposed to, for instance, WP discussion pages), a colon (:) must be inserted prior to the two-alphabetic language-specific designator (in this case, "he" and "ko"); otherwise, the string will not be displayed in the sidebar generated by this template but instead will be listed in the "in other languages" box in the left-hand margin of the article.