Template:Strings subpage/doc/zh: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(updated translations)
Line 2: Line 2:
<!-- Please place categories where indicated at the bottom of this page.) -->
<!-- Please place categories where indicated at the bottom of this page.) -->
一个面板,指示此页面包含模板或其他任何位置中使用的各种可翻译字符串。
一个面板,指示此页面包含模板或其他任何位置中使用的各种可翻译字符串。
== 用法 ==
== 寻找创建字符串子页面的方法? ==
{{Code|<nowiki>{{</nowiki>{{ROOTPAGENAME}}<nowiki>}}</nowiki>|select=1}} → {{ {{ROOTPAGENAME}} }}
如果你想创建一个字符串子页面,只需创建一个 "{{code|/strings}}" 子页面,然后粘贴以下代码:
{{Expand|title=查看代码|
{{CodeBlock|<nowiki>{{Strings subpage
|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 = {{Autolang
| Example
| de = Beispiel
| eo = Ekzemplo
| es = Ejemplo
| fi = Esimerkki
| fr = Exemple
| ru = Пример
| vi = Ví dụ
| zh = 示例
}}
}}</onlyinclude></includeonly>
</nowiki>}}
}}
{{Note|(非必需),但是当你添加新的语言时,建议按照语言代码从 A 到 Z 排序。}}
== 参数和示例 ==
{| class="standard-table" width="100%"
! {{Dictionary/common|Param}}
! {{Dictionary/common|Desc}}
! {{Dictionary/common|Example}}
|-
| align="center" | 无参数
| 放置模板。
| {{CodeBlock|margin=5px|<nowiki>{{Strings subpage}}</nowiki>}}
|-
| align="center" | {{Code|style=2|{{Param|number}}}}
| 字符串的数量。
| {{CodeBlock|margin=5px|<nowiki>| number = 6</nowiki>}}
|-
| align="center" | {{Code|style=2|{{Param|<语言代码>}}}}
| 指定语言的翻译字符串数量。
| {{CodeBlock|margin=5px|<nowiki>| en = 6</nowiki>}}{{CodeBlock|margin=5px|<nowiki>| eo = 3</nowiki>}}{{CodeBlock|margin=5px|<nowiki>| he = 2</nowiki>}}
|}
创建新的字符串子页面时,点击文档框右上角的三个点,然后点击“字符串”。这将创建一个新的字符串子页面,并自动应用适当的格式。当然,这并非必需,如果你愿意,也可以从头开始创建一个新的。
{{sandbox other||
{{sandbox other||
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->
[[Category:Templates]]
[[Category:Templates]]
}}
}}

Revision as of 23:48, 1 May 2024

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)
Edit-copy.png
This is a documentation subpage for Template:Strings subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

一个面板,指示此页面包含模板或其他任何位置中使用的各种可翻译字符串。

寻找创建字符串子页面的方法?

如果你想创建一个字符串子页面,只需创建一个 "/strings" 子页面,然后粘贴以下代码:

查看代码
{{Strings subpage |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 = {{Autolang | Example | de = Beispiel | eo = Ekzemplo | es = Ejemplo | fi = Esimerkki | fr = Exemple | ru = Пример | vi = Ví dụ | zh = 示例 }} }}</onlyinclude></includeonly>
Note.png注意:(非必需),但是当你添加新的语言时,建议按照语言代码从 A 到 Z 排序。

参数和示例

参数 描述 示例
无参数 放置模板。
{{Strings subpage}}
{{{number}}} 字符串的数量。
| number = 6
{{{<语言代码>}}} 指定语言的翻译字符串数量。
| en = 6
| eo = 3
| he = 2

创建新的字符串子页面时,点击文档框右上角的三个点,然后点击“字符串”。这将创建一个新的字符串子页面,并自动应用适当的格式。当然,这并非必需,如果你愿意,也可以从头开始创建一个新的。