This page is protected against editing.

Template:Translate

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Translate this file This SVG file contains embedded text that can be translated into your language, using any capable SVG editor, text editor or the SVG Translate tool. For more information see: About translating SVG files.
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Translate/doc.

Since SVG usually stores such information as plain text, these captions can easily be translated and a new SVG image uploaded, translated into a new language. You may add this template to pages of SVG images which contain embedded text or attached captions. This template will display a link to translation manual.

The template automatically sets the following categories:

Usage

{{Translate}}

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

Since SVG usually stores such information as plain text, these captions can easily be translated and a new SVG image uploaded, translated into a new language. You may add this template to pages of SVG images which contain embedded text or attached captions. This template will display a link to translation manual (https://commons.wikimedia.org/wiki/Commons:Translation_possible/Learn_more).

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
stylestyle

display style options

Lineoptional
switchswitch

Give it any value if the SVG is designed for usage of internal translation using the <switch> tag; omit otherwise.

Lineoptional
topictopic

text string specifying the file, e.g. flag, map, diagram

Lineoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

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

Example

{{Translate|switch=yes}}

renders as:

This file is translated using SVG <switch> elements. All translations are stored in the same file! Learn more.

For most Wikipedia projects, you can embed the file normally (without a lang parameter). The Wikipedia will use its language if the SVG file supports that language. For example, the German Wikipedia will use German if the SVG file has German. To embed this file in a particular language use the lang parameter with the appropriate language code, e.g. [[Template:Translate|lang=en]] for the English version. Do not specify a lang parameter if it is not needed. The parameter may prevent the use of a subsequent translation.

To translate the text into your language, you can use the SVG Translate tool. Alternatively, you can download the file to your computer, add your translations using whatever software you're familiar with, and re-upload it with the same name. You will find help in Graphics Lab if you're not sure how to do this.

See also

Localization

العربية | অসমীয়া | asturianu | беларуская (тарашкевіца)‎ | বাংলা | bosanski | català | čeština | dansk | Deutsch | Ελληνικά | English | Canadian English | Esperanto | español | eesti | euskara | فارسی | suomi | français | galego | עברית | हिन्दी | hrvatski | magyar | հայերեն | italiano | 日本語 | ქართული | ភាសាខ្មែរ | ಕನ್ನಡ | 한국어 | Ripoarisch | Lëtzebuergesch | lietuvių | македонски | മലയാളം | Bahasa Melayu | norsk bokmål | Plattdüütsch | Nederlands | norsk nynorsk | polski | Piemontèis | português | русский | sicilianu | සිංහල | slovenščina | shqip | српски / srpski | svenska | ไทย | Türkçe | українська | Tiếng Việt | 中文 | 中文(繁體)‎ | +/−

This template makes use of {{Autotranslate}} and the translate extension. The layout of the template can be found under Template:Translate/layout.