(Die Seite wurde neu angelegt: „<includeonly><!-- -->{{#if:{{tr|{{{1|}}}}}<!-- if $1 is a German term that has a {{tr/db}} entry -->|{{tr|{{{1|}}}}}<!-- return it -->|{{{1|}}}<!-- else: ret…“) |
(Überarbeitet, nutzt nun das Übersetzungs-Modul. // Revamped, now uses the translation module.) |
||
Zeile 1: | Zeile 1: | ||
<includeonly><!-- |
<includeonly><!-- |
||
+ | /* parameters: |
||
− | -->{{#if:{{tr|{{{1|}}}}}<!-- if $1 is a German term that has a {{tr/db}} entry |
||
+ | * $1 = term to be translated |
||
− | -->|{{tr|{{{1|}}}}}<!-- return it |
||
+ | * $2 = target language, default en |
||
− | -->|{{{1|}}}<!-- else: return $1 as it is |
||
+ | * force = force target language |
||
⚫ | |||
+ | */ |
||
+ | |||
+ | -->{{#vardefine:resultString|{{#invoke:Tr|go|{{{1}}}|{{{2|}}}|force={{{force|}}}}}}}<!-- get translation from db |
||
+ | |||
+ | // output |
||
+ | -->{{#ifeq:{{#var:resultString}}|(unknown)<!-- |
||
+ | -->|<!-- return nothing, as no translation was available |
||
+ | -->|{{#var:resultString}}<!-- |
||
+ | -->}}<!-- |
||
+ | |||
+ | --></includeonly><!-- |
||
+ | |||
⚫ |
Version vom 15. Mai 2019, 23:55 Uhr
Dokumentation
Siehe auch die englische Vorlagenseite: Template:Tr/check. Sie enthält möglicherweise umfassendere oder aktuellere Informationen.
Für diese Vorlage gibt es noch keine Dokumentations-Unterseite. Erstelle jetzt eine.