Template:Mul
Template:Template documentation
| The {{Mul}} template is used to display multiple language forms of the same name or term in a single, compact line, for example in article leads, infoboxes, or small notes. |
Purpose
[edit]The {{Mul}} template is a lightweight tool for listing several language versions of the same name or expression side by side. Typical use cases include:
- Giving a person's name in the original language and in common transliterations;
- Showing multiple names for a place in different languages;
- Listing original and translated titles of works, institutions or organizations.
Compared with manually writing brackets and separators in every article, {{Mul}} helps to:
- Keep formatting and ordering consistent across pages;
- Make it easier to change the separator or style globally;
- Keep article wikitext cleaner and more readable.
Basic syntax
[edit]The general syntax is:
{{Mul
|lang1 = text 1
|lang2 = text 2
|lang3 = text 3
|sep = custom separator (optional)
|wrap = wrapping style (optional)
}}
This template is intentionally generic. It does not force specific languages into specific parameters. Instead, you fill in numbered parameters with any content you need, including your own language labels if desired.
Parameters
[edit]Required parameters
[edit]At least one language-text parameter is required:
|lang1=,|lang2=,|lang3=, …- The actual text to be displayed (for example, an Arabic form of a name, an English form, a Chinese form, etc.).
The parameter number does not itself indicate a language – you may include labels such as "Arabic:", "English:" directly in the text.
Example:
{{Mul
|lang1 = Arabic: ماهر الأسد
|lang2 = English: Maher al-Assad
}}
Renders as (depending on local implementation):
Template:Template documentation
| The {{Mul}} template is used to display multiple language forms of the same name or term in a single, compact line, for example in article leads, infoboxes, or small notes. |
Purpose
[edit]The {{Mul}} template is a lightweight tool for listing several language versions of the same name or expression side by side. Typical use cases include:
- Giving a person's name in the original language and in common transliterations;
- Showing multiple names for a place in different languages;
- Listing original and translated titles of works, institutions or organizations.
Compared with manually writing brackets and separators in every article, {{Mul}} helps to:
- Keep formatting and ordering consistent across pages;
- Make it easier to change the separator or style globally;
- Keep article wikitext cleaner and more readable.
Basic syntax
[edit]The general syntax is:
{{Mul
|lang1 = text 1
|lang2 = text 2
|lang3 = text 3
|sep = custom separator (optional)
|wrap = wrapping style (optional)
}}
This template is intentionally generic. It does not force specific languages into specific parameters. Instead, you fill in numbered parameters with any content you need, including your own language labels if desired.
Parameters
[edit]Required parameters
[edit]At least one language-text parameter is required:
|lang1=,|lang2=,|lang3=, …- The actual text to be displayed (for example, an Arabic form of a name, an English form, a Chinese form, etc.).
The parameter number does not itself indicate a language – you may include labels such as "Arabic:", "English:" directly in the text.
Example:
{{Mul
|lang1 = Arabic: ماهر الأسد
|lang2 = English: Maher al-Assad
}}
Renders as (depending on local implementation): Template loop detected: Template:Mul
Optional parameters
[edit]|sep=- Custom separator between language items.
* If omitted, a default such as•(space–middle dot–space) is used. * You can set it to any text, for example/,,or a localized word.
|wrap=- Controls optional wrapping around the whole list. Suggested values:
*brackets– wrap with fullwidth square brackets, such as [...] *parentheses– wrap with round brackets, such as (...) *none(or left empty) – no extra wrapping
Example:
{{Mul
|lang1 = Arabic: ماهر الأسد
|lang2 = English: Maher al-Assad
|sep = /
|wrap = parentheses
}}
Might display as: (Arabic: ماهر الأسد / English: Maher al-Assad)
Examples
[edit]Person name example
[edit]In the lead of a biographical article, you might write:
'''Maher al-Assad''' ({{Mul
|lang1 = Arabic: ماهر الأسد
|lang2 = Transliteration: Maher al-Assad
|wrap = parentheses
}}; born 8 December 1967) is a Syrian military officer...
This keeps all language forms neatly grouped after the bolded name, in a style commonly used for biographies.
Place name example
[edit]'''Damascus''' ({{Mul
|lang1 = Arabic: دمشق
|lang2 = English: Damascus
|wrap = brackets
}}) is the capital of Syria...
Which may display as: Damascus[Arabic: دمشق • English: Damascus]
Work title example
[edit]The novel ''Example Book'' ({{Mul
|lang1 = Original title: عنوان مثال
|lang2 = English title: Example Book
}}) was first published in...
Behaviour and design
[edit]The {{Mul}} template is designed to be:
- **Inline** – it does not introduce line breaks by itself;
- **Lightweight** – it does not perform complex logic or language detection;
- **Flexible** – it does not enforce any particular language codes or ordering.
Important characteristics:
- It does not automatically add
<span lang="xx">tags; - It does not automatically link to language help pages;
- It does not assume which languages are being used – all visible labeling is up to the editor.
If you need strict language markup (for screen readers, accessibility, or typography reasons), consider combining {{Mul}} with other language-specific templates or modules, or using explicit HTML language tags in the parameter contents.
Template code
[edit]The following is a sample implementation. Local wikis may adapt this to their own conventions, add more parameters, or integrate with Lua modules if needed.
{{#vardefine:sep|{{#if:{{{sep|}}}|{{{sep}}}| • }} }}
{{#vardefine:wrap-open|
{{#switch:{{lc:{{{wrap|none}}}}}
|brackets = [
|parentheses = (
|#default =
}}
}}
{{#vardefine:wrap-close|
{{#switch:{{lc:{{{wrap|none}}}}}
|brackets = ]
|parentheses = )
|#default =
}}
}}
{{#if:{{{lang1|}}}|
{{#var:wrap-open}}
{{{lang1}}}
{{#if:{{{lang2|}}}|{{#var:sep}}{{{lang2}}}|}}
{{#if:{{{lang3|}}}|{{#var:sep}}{{{lang3}}}|}}
{{#if:{{{lang4|}}}|{{#var:sep}}{{{lang4}}}|}}
{{#if:{{{lang5|}}}|{{#var:sep}}{{{lang5}}}|}}
{{#var:wrap-close}}
}}
This sample supports |lang1= through |lang5=.
To support more languages, extend the pattern with additional lang6, lang7, etc., lines.
See also
[edit]- {{Lang}} – commonly used to tag text with a specific language
- {{IPA}} – for displaying the International Phonetic Alphabet
- {{Tnavbar}} – template navigation bar
- Help:Template – general help on templates
- Help:Multilingual – guidance on handling multilingual content
Optional parameters
[edit]|sep=- Custom separator between language items.
* If omitted, a default such as•(space–middle dot–space) is used. * You can set it to any text, for example/,,or a localized word.
|wrap=- Controls optional wrapping around the whole list. Suggested values:
*brackets– wrap with fullwidth square brackets, such as [...] *parentheses– wrap with round brackets, such as (...) *none(or left empty) – no extra wrapping
Example:
{{Mul
|lang1 = Arabic: ماهر الأسد
|lang2 = English: Maher al-Assad
|sep = /
|wrap = parentheses
}}
Might display as: (Arabic: ماهر الأسد / English: Maher al-Assad)
Examples
[edit]Person name example
[edit]In the lead of a biographical article, you might write:
'''Maher al-Assad''' ({{Mul
|lang1 = Arabic: ماهر الأسد
|lang2 = Transliteration: Maher al-Assad
|wrap = parentheses
}}; born 8 December 1967) is a Syrian military officer...
This keeps all language forms neatly grouped after the bolded name, in a style commonly used for biographies.
Place name example
[edit]'''Damascus''' ({{Mul
|lang1 = Arabic: دمشق
|lang2 = English: Damascus
|wrap = brackets
}}) is the capital of Syria...
Which may display as: Damascus[Arabic: دمشق • English: Damascus]
Work title example
[edit]The novel ''Example Book'' ({{Mul
|lang1 = Original title: عنوان مثال
|lang2 = English title: Example Book
}}) was first published in...
Behaviour and design
[edit]The {{Mul}} template is designed to be:
- **Inline** – it does not introduce line breaks by itself;
- **Lightweight** – it does not perform complex logic or language detection;
- **Flexible** – it does not enforce any particular language codes or ordering.
Important characteristics:
- It does not automatically add
<span lang="xx">tags; - It does not automatically link to language help pages;
- It does not assume which languages are being used – all visible labeling is up to the editor.
If you need strict language markup (for screen readers, accessibility, or typography reasons), consider combining {{Mul}} with other language-specific templates or modules, or using explicit HTML language tags in the parameter contents.
Template code
[edit]The following is a sample implementation. Local wikis may adapt this to their own conventions, add more parameters, or integrate with Lua modules if needed.
{{#vardefine:sep|{{#if:{{{sep|}}}|{{{sep}}}| • }} }}
{{#vardefine:wrap-open|
{{#switch:{{lc:{{{wrap|none}}}}}
|brackets = [
|parentheses = (
|#default =
}}
}}
{{#vardefine:wrap-close|
{{#switch:{{lc:{{{wrap|none}}}}}
|brackets = ]
|parentheses = )
|#default =
}}
}}
{{#if:{{{lang1|}}}|
{{#var:wrap-open}}
{{{lang1}}}
{{#if:{{{lang2|}}}|{{#var:sep}}{{{lang2}}}|}}
{{#if:{{{lang3|}}}|{{#var:sep}}{{{lang3}}}|}}
{{#if:{{{lang4|}}}|{{#var:sep}}{{{lang4}}}|}}
{{#if:{{{lang5|}}}|{{#var:sep}}{{{lang5}}}|}}
{{#var:wrap-close}}
}}
This sample supports |lang1= through |lang5=.
To support more languages, extend the pattern with additional lang6, lang7, etc., lines.
See also
[edit]- {{Lang}} – commonly used to tag text with a specific language
- {{IPA}} – for displaying the International Phonetic Alphabet
- {{Tnavbar}} – template navigation bar
- Help:Template – general help on templates
- Help:Multilingual – guidance on handling multilingual content