Template:Translate/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page.) --> == Usage == {{Code|<nowiki>{{Translate|<Instert specific section or tex...")
 
mNo edit summary
 
(19 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Doc/subpage}}
<!-- Please place categories where indicated at the bottom of this page.) -->
<!-- Please place categories where indicated at the bottom of this page.) -->
== Usage ==
== Usage ==
{{Code|<nowiki>{{Translate|<Instert specific section or text>}}</nowiki>}}<br>
{{todo|document all the type shortcuts}}
This template can now specify what sections need to be translated. Simply type after the | to specify which section or text needs to be translated.
This template is used on pages that need its content to be translated.


==Parameters==                                  <!-- requested to merge: Finish Translation, Translating, Machine Translation; since june 8 2023 ; -->
{| class="standard-table plainlinks"
! Parameters
! Description
! Example
! Result
|-
| No Parameters
| For use when entire pages need to be translated
| {{Code|<nowiki>{{Translate}}</nowiki>}}
| {{translate|nocat=1|namespaceoverride=Article}}
|-
| {{param|1}}
| For articles that may be mostly translated, but may have some incomplete sections.
| {{Code|<nowiki>{{Translate|Example text}}</nowiki>}}
| {{translate|Example text|nocat=1|namespaceoverride=Article}}
|-
| {{param|namespaceoverride}}
| Overrides the <nowiki>{{NAMESPACE}}</nowiki> magic word. Can only be {{Code|Template}} or blank
| {{Code|<nowiki>{{Translate|Example text|namespaceoverride=Article}}</nowiki>}}
| {{translate|Example text|namespaceoverride=Article|nocat=1}}
|-
| {{param|lang <1-5>}}
| For use on template pages. Specifies which languages are needed.
| {{Code|<nowiki>{{Translate|Example text|lang 1=zh|lang 2=de|lang 3=ru}}</nowiki>}}
| {{translate|Example text|lang 1=zh|lang 2=de|lang 3=ru|nocat=1}}
|-
| {{param|strings}}
| For use on template pages. Adds some text that links to the template's /strings subpage. Should either be {{code|true}} or blank.<br>If set to true you can specify a link using {{param|link}} parameter.
| {{Code|<nowiki>{{Translate|Example text|strings=true}}</nowiki>}}
| {{Translate|Example text|strings=true|nocat=1}}
|-
|height="50px" | {{param|nocat}}
| Prevents page from being added to the [[:Category:To be translated|Category:To be translated]] category.
|colspan="2" style=text-align:center;|{{code|<nowiki>{{Translate|nocat=1}}</nowiki>}}
|-
|{{param|type|finish}}
|For use when pages have been translated but not fully.
|{{Code|<nowiki>{{Translate|type=finish}}</nowiki>}}
|{{translate|type=finish|nocat=1}}
|-
|{{param|type|inprogress}}
|For use when pages that are currently being translated or will be translated soon.
|{{Code|<nowiki>{{Translate|type=inprogress}}</nowiki>}}
|{{translate|type=inprogress|nocat=1}}
|-
|{{param|type|machine}}
|For use when pages have been translated by a machine (e.g. Google Translate).
|{{Code|<nowiki>{{Translate|type=machine}}</nowiki>}}
|{{Translate|type=machine|nocat=1}}
|-
|{{param|type|update}}
|For use when the translated pages hasn't been updated for long time.
|{{Code|<nowiki>{{Translate|type=update}}</nowiki>}}
|{{Translate|type=update|nocat=1}}
|}
<includeonly>{{sandbox other||
<includeonly>{{sandbox other||
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->


}}</includeonly>
}}</includeonly>

Latest revision as of 07:11, 22 August 2024

Edit-copy.png
This is a documentation subpage for Template:Translate.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

Todo: document all the type shortcuts

This template is used on pages that need its content to be translated.

Parameters