Template:Translation table/doc
![]() | This is a documentation subpage for Template:Translation table. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
Usage
[edit]This template renders a two-column translation table using the language codes provided by the user. It supports both named and unnamed (positional) text/translation pairs.
Syntax
[edit]{{Translation table
|lang1code=es
|lang2code=en
|hola|hello
|uno|one
|dos|two
}}
Spanish | English |
---|---|
hola | hello |
uno | one |
dos | two |
You can also use named pairs for the same effect:
{{Translation table
|lang1code=ja
|lang2code=en
|text1=ありがとう |trans1=thank you
|text2=さようなら |trans2=goodbye
}}
Japanese | English |
---|---|
ありがとう | thank you |
さようなら | goodbye |
Notes
[edit]- Uses {{Lang}} under the hood for accessibility (adds lang attribute).
- Accepts italic/bold/link formatting (via `Langx`).
- Automatically derives column headers using {{ISO 639 name}}.
TemplateData
[edit]TemplateData for Translation table
Renders a two-column translation table using language codes and the {{Lang}} template for proper internationalization. It is not recommended to use this template while using the visual editor.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Language 1 code | lang1code lang1 | Language code for the first column (e.g. 'es' for Spanish)
| String | required |
Language 2 code | lang2code lang2 | Language code for the second column (e.g. 'en' for English)
| String | required |
Use "wikitext" table class | wikitextclass | Whether or not to set the table class to "wikitext". This will not affect your ability to put wikitext into the table.
| Boolean | optional |
Show Romanization | showromanization | Shows romaji/pinyin/etc.
| Boolean | optional |
Sortable | sortable | If the table should be sortable or not
| Boolean | optional |
First text value | text1 | First source-language word or phrase
| String | optional |
First translation | trans1 | First translated word or phrase
| String | optional |
Second text value | text2 | no description | String | optional |
Second translation | trans2 | no description | String | optional |