Template:Strings subpage: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 4: Line 4:
  - Language switcher -
  - Language switcher -


-->{{#if:{{{en|}}}{{{de|}}}{{{eo|}}}{{{ru|}}}{{{zh|}}}
-->{{#if:{{{en|}}}{{{ca|}}}{{{cs|}}}{{{de|}}}{{{es|}}}{{{eo|}}}{{{et|}}}{{{fr|}}}{{{hu|}}}{{{el|}}}{{{it|}}}{{{nl|}}}{{{no|}}}{{{pl|}}}{{{pt|}}}{{{pt-br|}}}{{{ru|}}}{{{uk|}}}{{{sv|}}}{{{tr|}}}{{{ja|}}}{{{zh|}}}{{{zh-tw|}}}{{{ko|}}}{{{ka|}}}{{{he|}}}
| {{Uselangflags
| {{Uselangflags
| en = {{{en|}}}
| en = {{{en|}}}
| ca = {{{ca|}}}
| cs = {{{cs|}}}
| de = {{{de|}}}
| de = {{{de|}}}
| es = {{{es|}}}
| eo = {{{eo|}}}
| eo = {{{eo|}}}
| et = {{{et|}}}
| fr = {{{fr|}}}
| hu = {{{hu|}}}
| el = {{{el|}}}
| it = {{{it|}}}
| nl = {{{nl|}}}
| no = {{{no|}}}
| pl = {{{pl|}}}
| pt = {{{pt|}}}
| pt-br = {{{pt-br|}}}
| ru = {{{ru|}}}
| ru = {{{ru|}}}
| uk = {{{uk|}}}
| sv = {{{sv|}}}
| tr = {{{tr|}}}
| ja = {{{ja|}}}
| zh = {{{zh|}}}
| zh = {{{zh|}}}
| zh-tw = {{{zh-tw|}}}
| ko = {{{ko|}}}
| ka = {{{ka|}}}
| he = {{{he|}}}
   }}
   }}
}}<!--
}}<!--
Line 19: Line 40:
<div style="opacity:0.05; user-select:none; pointer-events:none; position:absolute; {{Dir|ltr=right|rtl=left}}:-32px">[[File:icon-settings.png|64px|link=]]</div>
<div style="opacity:0.05; user-select:none; pointer-events:none; position:absolute; {{Dir|ltr=right|rtl=left}}:-32px">[[File:icon-settings.png|64px|link=]]</div>
<div style="font-size:16px; color:white">{{Autolang
<div style="font-size:16px; color:white">{{Autolang
|Subpage of strings
| Subpage of strings
| eo = Subpaĝo da literaroj
| eo = Subpaĝo da literaroj
| ru = Подстраница предложений (лингвистика)
| ru = Подстраница предложений (лингвистика)
| zh = 包含可调用字符串的子页面}}</div>
| zh = 包含可调用字符串的子页面}}</div>
<div>{{Autolang
<div>{{Autolang
|It contains various translatable strings that are used in the template or anywhere else.
| It contains various translatable strings that are used in the template or anywhere else.
| eo = Ĝi enhavas diversajn tradukeblajn literarojn uzitaj en ĉi ŝablono aŭ ajn ie.
| eo = Ĝi enhavas diversajn tradukeblajn literarojn uzitaj en ĉi ŝablono aŭ ajn ie.
| ru = Она содержит различные переводимые строки, которые используются в шаблоне или где-либо ещё.
| ru = Она содержит различные переводимые строки, которые используются в шаблоне или где-либо ещё.
Line 32: Line 53:
  - Panel 2 -
  - Panel 2 -


-->{{#if:{{{number|}}}{{{en|}}}{{{de|}}}{{{eo|}}}{{{ru|}}}{{{zh|}}}
-->{{#if:{{{number|}}}{{{en|}}}{{{ca|}}}{{{cs|}}}{{{de|}}}{{{es|}}}{{{eo|}}}{{{et|}}}{{{fr|}}}{{{hu|}}}{{{el|}}}{{{it|}}}{{{nl|}}}{{{no|}}}{{{pl|}}}{{{pt|}}}{{{pt-br|}}}{{{ru|}}}{{{uk|}}}{{{sv|}}}{{{tr|}}}{{{ja|}}}{{{zh|}}}{{{zh-tw|}}}{{{ko|}}}{{{ka|}}}{{{he|}}}
| {{Messagebox|image=|text=
| {{Messagebox|image=|text=
{{#if:{{{number|}}}
{{#if:{{{number|}}}
| <span style="margin-right:.3em">Number of strings:</span>{{Code|{{{number}}}}}<br>
| <span style="margin-right:.3em">Number of strings:</span>{{Code|{{{number}}}}}<br>
|}}
|}}
{{#if:{{{en|}}}{{{de|}}}{{{eo|}}}{{{ru|}}}{{{zh|}}}
{{#if:{{{en|}}}{{{ca|}}}{{{cs|}}}{{{de|}}}{{{es|}}}{{{eo|}}}{{{et|}}}{{{fr|}}}{{{hu|}}}{{{el|}}}{{{it|}}}{{{nl|}}}{{{no|}}}{{{pl|}}}{{{pt|}}}{{{pt-br|}}}{{{ru|}}}{{{uk|}}}{{{sv|}}}{{{tr|}}}{{{ja|}}}{{{zh|}}}{{{zh-tw|}}}{{{ko|}}}{{{ka|}}}{{{he|}}}
| <span style="margin-right:.3em">Approximate status of translation:</span><!--
| <span style="margin-right:.3em">Approximate status of translation:</span><!--
-->{{#if:{{{en|}}}| {{Code|{{en}} {{{en}}}%}}&nbsp; |}}<!--
-->{{#if:{{{en|}}}| {{Code|{{en}} {{{en}}}%}}&nbsp; |}}<!--
-->{{#if:{{{ca|}}}| {{Code|{{ca}} {{{ca}}}%}}&nbsp; |}}<!--
-->{{#if:{{{cs|}}}| {{Code|{{cs}} {{{cs}}}%}}&nbsp; |}}<!--
-->{{#if:{{{de|}}}| {{Code|{{de}} {{{de}}}%}}&nbsp; |}}<!--
-->{{#if:{{{de|}}}| {{Code|{{de}} {{{de}}}%}}&nbsp; |}}<!--
-->{{#if:{{{eo|}}}| {{Code|{{eo}} {{{eo}}}%}}&nbsp; |}}<!--
-->{{#if:{{{eo|}}}| {{Code|{{eo}} {{{eo}}}%}}&nbsp; |}}<!--
-->{{#if:{{{et|}}}| {{Code|{{et}} {{{et}}}%}}&nbsp; |}}<!--
-->{{#if:{{{fr|}}}| {{Code|{{fr}} {{{fr}}}%}}&nbsp; |}}<!--
-->{{#if:{{{hu|}}}| {{Code|{{hu}} {{{hu}}}%}}&nbsp; |}}<!--
-->{{#if:{{{el|}}}| {{Code|{{el}} {{{el}}}%}}&nbsp; |}}<!--
-->{{#if:{{{it|}}}| {{Code|{{it}} {{{it}}}%}}&nbsp; |}}<!--
-->{{#if:{{{nl|}}}| {{Code|{{nl}} {{{nl}}}%}}&nbsp; |}}<!--
-->{{#if:{{{no|}}}| {{Code|{{no}} {{{no}}}%}}&nbsp; |}}<!--
-->{{#if:{{{pl|}}}| {{Code|{{pl}} {{{pl}}}%}}&nbsp; |}}<!--
-->{{#if:{{{pt|}}}| {{Code|{{pt}} {{{pt}}}%}}&nbsp; |}}<!--
-->{{#if:{{{pt-br|}}}| {{Code|{{pt-br}} {{{pt-br}}}%}}&nbsp; |}}<!--
-->{{#if:{{{ru|}}}| {{Code|{{ru}} {{{ru}}}%}}&nbsp; |}}<!--
-->{{#if:{{{ru|}}}| {{Code|{{ru}} {{{ru}}}%}}&nbsp; |}}<!--
-->{{#if:{{{zh|}}}| {{Code|{{zh}} {{{zh}}}%}}&nbsp; |}}
-->{{#if:{{{uk|}}}| {{Code|{{uk}} {{{uk}}}%}}&nbsp; |}}<!--
-->{{#if:{{{sv|}}}| {{Code|{{sv}} {{{sv}}}%}}&nbsp; |}}<!--
-->{{#if:{{{tr|}}}| {{Code|{{tr}} {{{tr}}}%}}&nbsp; |}}<!--
-->{{#if:{{{ja|}}}| {{Code|{{ja}} {{{ja}}}%}}&nbsp; |}}<!--
-->{{#if:{{{zh|}}}| {{Code|{{zh}} {{{zh}}}%}}&nbsp; |}}<!--
-->{{#if:{{{zh-tw|}}}| {{Code|{{zh-tw}} {{{zh-tw}}}%}}&nbsp; |}}<!--
-->{{#if:{{{ko|}}}| {{Code|{{ko}} {{{ko}}}%}}&nbsp; |}}<!--
-->{{#if:{{{ka|}}}| {{Code|{{ka}} {{{ka}}}%}}&nbsp; |}}<!--
-->{{#if:{{{he|}}}| {{Code|{{he}} {{{he}}}%}}&nbsp; |}}
|}}
|}}
   }}
   }}
|}}</onlyinclude></includeonly>
|}}</onlyinclude></includeonly>

Revision as of 05:37, 1 April 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.

A panel indicating that the page it is on contains strings that are used in lieu of complicated #switch parser (or formerly, {{autolang}}(s)) on the base page.

Looking for creating a Strings subpage?

If you are looking for creating a strings subpage, just create a "/strings" subpage, then paste the following code:

See the code
{{Strings subpage<!-- Don't forget to update once you add new translation to a strings. --> |number = 1 | en = 1 | de = 1 | eo = 1 | es = 1 | fi = 1 | fr = 1 | ru = 1 | vi = 1 | zh = 1 }} * {{{{PAGENAME}}|Example}} <includeonly><onlyinclude>{{#switch:{{{1}}}<!-- Remember to keep this clean by sorting A-Z, and copy paste the tab space instead of pressing "SPACE" repeatedly. --> | Example = {{#switch: {{language}} | #default = Example | de = Beispiel | eo = Ekzemplo | es = Ejemplo | fi = Esimerkki | fr = Exemple | ru = Пример | vi = Ví dụ | zh = 示例 }} }}</onlyinclude></includeonly>
Note.pngNote:(Not required), but when you add a new language, it is recommended to sort the language codes from A to Z.

Parameters and Examples

Parameter Description Example
No Parameters Places the template.
{{Strings subpage}}
{{{number}}} Number of strings.
| number = 6
{{{<language code>}}} Number of translated strings into the specified language.
| en = 6
| eo = 3
| he = 2
When creating a new strings subpage, click on the three dots in the top right of the documentation box and click "Strings". This will create a new strings subpage with the proper formatting already applied. Of course, this is not required and you can just create a new one from scratch if you so wish.