本地化:修订间差异

本页面所适用的版本可能已经过时,最后更新于1.2
第286行: 第286行:
|-
|-
|#W
|#W
|Text is displayed as a warning
| 文本显示为警告
|<pre>#W Only your younger children lacks [guardians|E]#!</pre>
|<pre>#W Only your younger children lacks [guardians|E]#!</pre>
|-
|-
|#T
|#T
|Text is displayed as a title
| 文本显示为标题
|<pre>#T Randomize Dynasty Name#!</pre>
|<pre>#T Randomize Dynasty Name#!</pre>
|-
|-
|#E
|#E
|Text is displayed as a game concept
| 文字显示为游戏概念
|<pre>#E Randomize#!</pre>
|<pre>#E Randomize#!</pre>
|-
|-
第310行: 第310行:
|-
|-
|#U
|#U
|Transform text to uppercase
| 将文本转换为大写
|<pre>[TITLE.GetName|U]</pre>
|<pre>[TITLE.GetName|U]</pre>
|-
|-
|#L
|#L
|Transform text to lowercase
| 将文本转换为小写
|<pre>[TITLE.GetName|L]</pre>
|<pre>[TITLE.GetName|L]</pre>
|-
|-
|#EMP
|#EMP
|Text is emphasized
| 文本被强调
|<pre>#EMP Emphasis here #!</pre>
|<pre>#EMP Emphasis here #!</pre>
|-
|-
第326行: 第326行:
|-
|-
|#bold
|#bold
|Text is displayed in bold
| 文本以粗体显示
|<pre>You have #bold NOT #! done this</pre>
|<pre>You have #bold NOT #! done this</pre>
|-
|-
|#italic
|#italic
|Text is displayed in italics
| 文本以斜体显示
|<pre>You #weak will #! do this</pre>
|<pre>You #weak will #! do this</pre>
|-
|-
第346行: 第346行:
</pre>
</pre>


By default the concept starts with first letter in upper case, you can set the first letter in lower case as follows :
默认情况下,概念以大写的第一个字母开头,您可以将第一个字母设置为小写,如下所示:


<pre>
<pre>
第355行: 第355行:
</pre>
</pre>


The expression linking to the game concept can be customized as follows :
链接到游戏概念的表达式可以自定义,如下:


<pre>
<pre>
第364行: 第364行:
</pre>
</pre>


== Rounding numbers ==
== 舍入数 ==
If a numeric value has a decimal portion, it can be rounded by using the desired number of decimal places, such as:
如果数值有小数部分,则可以根据所需的小数位数对其进行舍入,例如:


<pre>
<pre>
第375行: 第375行:
</pre>
</pre>


Note that the value is '''always''' rounded down.
请注意,该值总是向下舍入。


== 参考资料 ==
== 参考资料 ==

2021年9月17日 (五) 09:17的版本

本地化文件位于localization文件夹中。

与大多数其他文件不同,本地化文件具有.yml扩展名。

所有文件名称类似于:<某一事项>_l_<语言>.yml

文件格式是有BOM的UTF-8。

文本格式化以字符#开始,字符#!结束。

#<格式化代码> <文本> #!

例如:
#P +15%#!

插入其他本地化键值:$<其他键值>$(例如$special_contract_march_short$)

举例:

l_english:
 innovation_motte:0 "Mottes"
 innovation_motte_desc:0 "Simple yet effective, building our castles on raised earthen mounds is the best way to ensure we quite literally have the high ground over our enemies."
 unlock_tribal_economic_buildings:0 "Unlocks all Tribal Era [economic_buildings|E]"
 unlock_tribal_military_buildings:0 "Unlocks all Tribal Era [military_buildings|E]"
 unlock_march_contract:0 "Unlocks the #high $special_contract_march_short$#! [feudal_contract|E]"

指令

指令必须用于本地化是动态并且基于某些条件而改变的实例。调用一个指令将显示特定文本字符串。

性别

这些指令将显示根据作用域中角色的性别而变化的文本。

指令
GetHerHim
GetHerHis
GetHerHisMy
GetHersHis
GetHerselfHimself
GetLadyLord
GetSheHe

角色名称

这些指令将显示角色名称的某些变体。此列表不完整。

指令
GetFirstName
GetFirstNameBase
GetFirstNameNicknamed
GetFirstNameNicknamedNoTooltip
GetFirstNameNicknamedNoTooltipRegnal
GetFirstNameNicknamedOrMe
GetFirstNameNicknamedOrMeNoTooltip
GetFirstNameNicknamedOrMeNoTooltipRegnal
GetFirstNameNicknamedOrMeRegnal
GetFirstNameNicknamedPossessive
GetFirstNameNicknamedPossessiveNoTooltip
GetFirstNameNicknamedPossessiveNoTooltipRegnal
GetFirstNameNicknamedPossessiveOrMy
GetFirstNameNicknamedPossessiveOrMyNoTooltip
GetFirstNameNicknamedPossessiveOrMyNoTooltipRegnal
GetFirstNameNicknamedPossessiveOrMyRegnal
GetFirstNameNicknamedPossessiveRegnal
GetFirstNameNicknamedRegnal
GetFirstNameNoTooltip
GetFirstNameNoTooltipRegnal
GetFirstNameOrMe
GetFirstNameOrMeNoTooltip
GetFirstNameOrMeNoTooltipRegnal
GetFirstNameOrMeRegnal
GetFirstNamePossessive
GetFirstNamePossessiveNoTooltip
GetFirstNamePossessiveNoTooltipRegnal
GetFirstNamePossessiveOrMy
GetFirstNamePossessiveOrMyNoTooltip
GetFirstNamePossessiveOrMyNoTooltipRegnal
GetFirstNamePossessiveOrMyRegnal
GetFirstNamePossessiveRegnal
GetFirstNameRegnal
GetFullName
GetFullNameNicknamed
GetFullNameNicknamedNoTooltip
GetFullNameNicknamedNoTooltipRegnal
GetFullNameNicknamedOrMe
GetFullNameNicknamedOrMeNoTooltip
GetFullNameNicknamedOrMeNoTooltipRegnal
GetFullNameNicknamedOrMeRegnal
GetFullNameNicknamedPossessive
GetFullNameNicknamedPossessiveNoTooltip
GetFullNameNicknamedPossessiveNoTooltipRegnal
GetFullNameNicknamedPossessiveOrMy
GetFullNameNicknamedPossessiveOrMyNoTooltip
GetFullNameNicknamedPossessiveOrMyNoTooltipRegnal
GetFullNameNicknamedPossessiveOrMyRegnal
GetFullNameNicknamedPossessiveRegnal
GetFullNameNicknamedRegnal
GetFullNameNoTooltip
GetFullNameNoTooltipRegnal
GetFullNameOrMe
GetFullNameOrMeNoTooltip
GetFullNameOrMeNoTooltipRegnal
GetFullNameOrMeRegnal
GetFullNamePossessive
GetFullNamePossessiveNoTooltip
GetFullNamePossessiveNoTooltipRegnal
GetFullNamePossessiveOrMy
GetFullNamePossessiveOrMyNoTooltip
GetFullNamePossessiveOrMyNoTooltipRegnal
GetFullNamePossessiveOrMyRegnal
GetFullNamePossessiveRegnal
GetFullNameRegnal
GetName
GetNameNicknamed
GetNameNicknamedNoTooltip
GetNameNicknamedNoTooltipRegnal
GetNameNicknamedOrMe
GetNameNicknamedOrMeNoTooltip
GetNameNicknamedOrMeNoTooltipRegnal
GetNameNicknamedOrMeRegnal
GetNameNicknamedPossessive
GetNameNicknamedPossessiveNoTooltip
GetNameNicknamedPossessiveNoTooltipRegnal
GetNameNicknamedPossessiveOrMy
GetNameNicknamedPossessiveOrMyNoTooltip
GetNameNicknamedPossessiveOrMyNoTooltipRegnal
GetNameNicknamedPossessiveOrMyRegnal
GetNameNicknamedPossessiveRegnal
GetNameNicknamedRegnal
GetNameNoTooltip
GetNameNoTooltipRegnal
GetNameOrMe
GetNameOrMeNoTooltip
GetNameOrMeNoTooltipRegnal
GetNameOrMeRegnal
GetNamePossessive
GetNamePossessiveNoTooltip
GetNamePossessiveNoTooltipRegnal
GetNamePossessiveOrMy
GetNamePossessiveOrMyNoTooltip
GetNamePossessiveOrMyNoTooltipRegnal
GetNamePossessiveOrMyRegnal
GetNamePossessiveRegnal
GetNameRegnal

特殊字符

一些字符集执行特殊功能。

指令 描述 示例
\n 换行。仅在某些情况下有效。
#P Formats text "positive"
#P A very good thing has happened#!
OR
[GetFullName|P]
#N Formats text "negative"
#N A rather bad thing has happened#!
OR
[GetFullName|N]
#help Text is shown using a help style
#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].#!
#I Text is displayed in an informational style
#I Click to view your [GetPlayer.GetCouncillorPosition( 'councillor_court_chaplain' ).GetPositionName]#!
#W 文本显示为警告
#W Only your younger children lacks [guardians|E]#!
#T 文本显示为标题
#T Randomize Dynasty Name#!
#E 文字显示为游戏概念
#E Randomize#!
#X Text is displayed as a warning in italic format
#X Choosing a New Appearance will discard ALL previous changes!#!
#S Formats text bold and italic
#S Occupying Counties:#!
#V Formats text white
#V This text is white #!
OR
[GetFullName|V]
#U 将文本转换为大写
[TITLE.GetName|U]
#L 将文本转换为小写
[TITLE.GetName|L]
#EMP 文本被强调
#EMP Emphasis here #!
#weak Text has a lighter color
#weak footnote or aside #!
#bold 文本以粗体显示
You have #bold NOT #! done this
#italic 文本以斜体显示
You #weak will #! do this

链接

本地化字符串可以链接到游戏概念,如下所示:

[concept_key|E]

# So for example
[faith|E]

默认情况下,概念以大写的第一个字母开头,您可以将第一个字母设置为小写,如下所示:

[concept_key|El]

# So for example
"The word [faith|El] is now starting by a lower case letter"

链接到游戏概念的表达式可以自定义,如下:

[Concept('concept_key','Customized expression')|E]

# So for example
"The game concept link [Concept('faith','religion')|E] is now written as religion."

舍入数

如果数值有小数部分,则可以根据所需的小数位数对其进行舍入,例如:

# Round to 2 decimals
[some_value|2]

# Remove all decimals:
[some_value|0]

请注意,该值总是向下舍入。

参考资料