编辑“本地化

警告:您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您登录创建一个账户,您的编辑将归属于您的用户名,且将享受其他好处。

该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。

最后版本 您的文本
第1行: 第1行:
{{version|1.4}}
{{version|1.1}}
{{Expand‎}}
{{Expand‎}}
本地化文件位于localization文件夹中。
Localization files can be found in the localization folder.


与大多数其他文件不同,本地化文件具有.yml 扩展名。
Unlike most other files, they localization files have .yml extension.


所有文件名称类似于:< 某一事项>_l_< 语言>.yml
All files names should look like this: <something>_l_<language>.yml


文件格式是有BOM的UTF-8
The file format is UTF-8 with BOM.


文本格式化以字符'''#'''开始,字符'''#!'''结束。
Text formatting: #<formatting code> <text> #! (e.g. #P +15%#! )


<pre>
Insert other localization keys: $<other key>$ (e.g. $special_contract_march_short$ )
#<格式化代码> <文本> #!
 
例如:
#P +15%#!
</pre>
 
插入其他本地化键值:$< 其他键值>$ (例如$special_contract_march_short$


举例:
Example:
<pre>
<pre>
l_english:
l_english:
第30行: 第23行:
</pre>
</pre>


== 指令 ==
== Commands ==
指令必须用于本地化是动态并且基于某些条件而改变的实例。调用一个指令将显示特定文本字符串。
Commands are used in instances where localisation must be dynamic and change based on certain conditions. Invoking a command will print out a specific string of text.


=== 性别 ===
=== Gender ===
这些指令将显示根据作用域中角色的性别而变化的文本。
These commands will show text that vary based on the gender of the character in scope.


{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
! 指令
! Command
|-
|-
| GetHerHim
| GetHerHim
第55行: 第48行:
|}
|}


=== 角色名称 ===
=== Character names ===
这些指令将显示角色名称的某些变体。此列表不完整。
These commands will show some variation of the name of the character. This is not a complete list.


{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
! 指令
! Command
|-
|-
| GetFirstName
| GetFirstName
第256行: 第249行:
| GetNameRegnal
| GetNameRegnal
|}
|}
== 特殊字符 ==
一些字符集执行特殊功能。
{| class="wikitable"
!指令
!描述
!示例
|-
|\n
|换行。仅在某些情况下有效。
|
|-
|#P
|Formats text "positive"
|<pre>#P A very good thing has happened#!</pre> OR <pre>[GetFullName|P]</pre>
|-
|#N
|Formats text "negative"
|<pre>#N A rather bad thing has happened#!</pre> OR <pre>[GetFullName|N]</pre>
|-
|#help
|Text is shown using a help style
|<pre>#help If you do not give either Gold or Soldiers to the war effort, your [head_of_faith|E] will condemn you and you will lose [piety|E].#!</pre>
|-
|#I
|Text is displayed in an informational style
|<pre>#I Click to view your [GetPlayer.GetCouncillorPosition( 'councillor_court_chaplain' ).GetPositionName]#!</pre>
|-
|#W
|文本显示为警告
|<pre>#W Only your younger children lacks [guardians|E]#!</pre>
|-
|#T
|文本显示为标题
|<pre>#T Randomize Dynasty Name#!</pre>
|-
|#E
|文字显示为游戏概念
|<pre>#E Randomize#!</pre>
|-
|#X
|Text is displayed as a warning in italic format
|<pre>#X Choosing a New Appearance will discard ALL previous changes!#!</pre>
|-
|#S
|Formats text bold and italic
|<pre>#S Occupying Counties:#!</pre>
|-
|#V
|Formats text white
|<pre>#V This text is white #!</pre> OR <pre>[GetFullName|V]</pre>
|-
|#U
|将文本转换为大写
|<pre>[TITLE.GetName|U]</pre>
|-
|#L
|将文本转换为小写
|<pre>[TITLE.GetName|L]</pre>
|-
|#EMP
|文本被强调
|<pre>#EMP Emphasis here #!</pre>
|-
|#weak
|Text has a lighter color
|<pre>#weak footnote or aside #!</pre>
|-
|#bold
|文本以粗体显示
|<pre>You have #bold NOT #! done this</pre>
|-
|#italic
|文本以斜体显示
|<pre>You #weak will #! do this</pre>
|-
|}
== 链接 ==
本地化字符串可以链接到游戏概念,如下所示:
<pre>
[concept_key|E]
# So for example
[faith|E]
</pre>
默认情况下,概念以大写的第一个字母开头,您可以将第一个字母设置为小写,如下所示:
<pre>
[concept_key|El]
# So for example
"The word [faith|El] is now starting by a lower case letter"
</pre>
链接到游戏概念的表达式可以自定义,如下:
<pre>
[Concept('concept_key','Customized expression')|E]
# So for example
"The game concept link [Concept('faith','religion')|E] is now written as religion."
</pre>
== 舍入数 ==
如果数值有小数部分,则可以根据所需的小数位数对其进行舍入,例如:
<pre>
# Round to 2 decimals
[some_value|2]
# Remove all decimals:
[some_value|0]
</pre>
请注意,该值总是向下舍入。


== 参考资料 ==
== References ==
<references/>
<references/>
{{Modding navbox}}
{{Modding navbox}}
[[Category:模组制作]]
[[Category:模组制作]]
[[en:Localization]]
[[en:Localization]]
请注意您对十字军之王3百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在十字军之王3百科:版权的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。 未经许可,请勿提交受版权保护的作品!

为防止机器编辑,请完成下方验证

取消 编辑帮助(在新窗口中打开)