Template:Translation

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
{{{1}}}
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Translation/doc.

This template is to distinguish translations in multi-language discussions.

Usage

{{Translation |1= |2= }}

Template parameters

<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This template is to distinguish translations in multi-language discussions.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
text1

The translated text. Remember to prefix it with “1=” if the content includes any equal signs (e.g. in URL).

Contentrequired
translator2

Signature of the translator

Contentoptional

Additional information

The template is intended to be used in the following namespaces: all talk namespaces and noticeboards

The template is intended to be used by the following user groups: all users

Placement:

Underneath the comment translated

Example

{{Translation|Sniðið tekur einnig mögulega aðra færibreytu, undirskrift þýðandans.|~~~~}}

renders as:

Sniðið tekur einnig mögulega aðra færibreytu, undirskrift þýðandans.
translator: Swift 05:27, 22 September 2006 (UTC)

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)

Bugs

  • Sometimes the template won't include properly. I believe the issue may have something to do with external links in brackets... --Swift 05:27, 22 September 2006 (UTC)
    @Swift: I was able to make this work by escaping the vertical bar using {{!}} in this edit.   — Jeff G. ツ please ping or talk to me 16:41, 25 April 2018 (UTC)
  • The floating div may appear below the box if the amount of the translated text is right. I don't know how to fix that. :-( --Swift 05:27, 22 September 2006 (UTC)
    @Swift: I almost always end parameter 1 with "<br /> " to guarantee room for parameter 2. The nonbreaking space is important, please see my wikitext.   — Jeff G. please ping or talk to me 01:34, 29 September 2018 (UTC)
    @Swift and Jeff G.: It doesn’t have to float in the first place. I changed it to a non-floating right-aligned version, and voilà! —Tacsipacsi (talk) 13:03, 10 June 2019 (UTC)