Template:TranslateThis/doc: Difference between revisions

From Wikidata
Jump to navigation Jump to search
Content deleted Content added
m Reverted edits by 2607:FEA8:4C40:150:840B:4C65:9D0C:9867 (talk) to last revision by Darellur
Tag: Rollback
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- Categories go at the bottom of this page. -->
<!-- Categories go at the bottom of this page. -->
{{Lua|Module:TranslateThis}}

<templatedata>
{
"description": {
"en": "This template can be used to display multilingual text in user’s preferred language if available, and display a call for translation if not.",
"de": "Diese Vorlage kann benutzt werden, um mehrsprachige Text in der gewählten Sprache des Benutzers zu zeigen, wenn sie verfügbar ist, sonst Übersetzung anzufragen.",
"pl": "Ten szablon może być używany, by wyświetlać wielojęzyczny tekst w języku ustawień użytkownika, o ile jest dostępny, i by wyświetlać wezwanie do tłumaczenia, jeśli nie jest."
},
"params": {
"en": {
"label": {
"en": "English",
"de": "Englisch",
"pl": "angielski"
},
"description": {
"en": "The translatable text in English. Similarly “de” for German, “fr” for French, “es” for Spanish etc. Note that only the English text is required.",
"de": "Die übersetzbare Text auf Englisch. Änlich „de“ für Deutsch, „fr“ für Französisch, „es“ für Spanisch usw. Nur englische Text ist erforderlich.",
"pl": "Tekst do tłumaczenia po angielsku. Podobnie „pl” dla polskiego. „de” dla niemieckiego, „fr” dla francuskiego. Zauważ, że tylko tekst po angielsku jest wymagany."
},
"example": "English text",
"type": "line",
"required": true
},
"anchor": {
"label": {
"en": "anchor",
"de": "Anker"
},
"description": {
"en": "Language-independent anchor for the template output. Either an anchor text, or the code of a language present to use text in that language in the anchor (e.g. “en” to create anchor from the English text, even if the template is displayed in a different language).",
"de": "Sprachunabhängiger Anker für die Ausgabe der Vorlage. Entweder eine Ankertext, oder der Code einer gegebenen Sprache, um die Text dieser Sprache zu nutzen (z. B. „en“, um zu dem Anker die englische Text zu nutzen, auch wenn die Vorlage in einer anderen Sprache gezeigt wird)."
},
"type": "line"
},
"lang": {
"label": {
"en": "language",
"de": "Sprache",
"pl": "język"
},
"description": {
"en": "Language code to display the template in. This affects the chosen translation as well as the “please translate this” text. Useful in other templates and translated help pages to provide consistent output.",
"de": "Code der Sprache, in der die Text gezeigt werden soll. Wird benutzt auch fürs gewählte Übersetzung und die „bitte übersetze“-Text. Praktisch in anderen Vorlagen und auf Hilfeseiten, um konsistente Ausgabe zu produzieren.",
"pl": "Kod języka, w którym ma być wyświetlony tekst. To wpływa na wybór tłumaczenia jak i tekst wezwania do tłumaczenia. Przydatny w innych szablonach i tłumaczonych stronach pomocy, aby zapewnić spójne wyniki."
},
"example": "en",
"type": "line"
}
}
}
</templatedata>


== Usage ==
== Usage ==
{{TranslateThis}}

== Parameters ==
* '''anchor''': If this parameter is supplied, a language-independent [[Template:anchor|anchor]] is generated. You can either directly specify the anchor name, or supply a code of the language, whose text should be used as the anchor.


== See also ==
== See also ==
*{{tl|LangSwitch}} – displays text in user language similarly, but doesn’t include the call for translation if no perfectly matching translation found
*{{tl|LangSwitch}}
*{{tl|Anchor}} – used in this template to provide anchor

*{{tl|Help translate}} – used in this template to show the call for translation, please translate it there
<includeonly>
<includeonly>
<!-- Categories go here: -->
<!-- Categories go here: -->

Latest revision as of 04:21, 15 June 2024

This template can be used to display multilingual text in user’s preferred language if available, and display a call for translation if not.

Template parameters

ParameterDescriptionTypeStatus
Englishen

The translatable text in English. Similarly “de” for German, “fr” for French, “es” for Spanish etc. Note that only the English text is required.

Example
English text
Linerequired
anchoranchor

Language-independent anchor for the template output. Either an anchor text, or the code of a language present to use text in that language in the anchor (e.g. “en” to create anchor from the English text, even if the template is displayed in a different language).

Lineoptional
languagelang

Language code to display the template in. This affects the chosen translation as well as the “please translate this” text. Useful in other templates and translated help pages to provide consistent output.

Example
en
Lineoptional

Usage

[edit]

See also

[edit]
  • {{LangSwitch}} – displays text in user language similarly, but doesn’t include the call for translation if no perfectly matching translation found
  • {{Anchor}} – used in this template to provide anchor
  • {{Help translate}} – used in this template to show the call for translation, please translate it there