英白拉多:罗马
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
资助我们
×
欢迎访问英白拉多:罗马百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“本地化”的源代码
←
本地化
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|1.4}} Localization translates the in code into names and descriptions into a more presentable in game format. It also allows the piece of code to be displayed differently in different languages in game. == Localization modding== Localization is handled by .yml files in the game/localization folder. An advanced text editor like [https://www.notepad-plus-plus.org/ Notepad++] and [https://code.visualstudio.com/ Visual Studio Code] is recommended, however, if those aren't available, even standard Notepad will work. The naming convention for .yml files is '''<file>_l_<language>.yml''' where <file> is the name given for this group of localizations, and <language> is the language the localization is for. Supported languages currently include English (''english''), French (''french''), German (''german''), Russian (''russian''), Spanish (''spanish''), and simplified Chinese (''simp_chinese''). If the file does not follow the format of '''<file>_l_<language>.yml''' , it will not be recognized by the game. === Creating Localization Files === * In the root mod folder (not in common), create a folder named "''localization''" (Note: Imperator uses localization with z, not an s). * Optionally, create language subfolders within the "''localization''" folder. This is organizationally helpful but not required. * Localization files are encoded as UTF-8-BOM. The easiest way to get the correct encoding is to copy an existing .yml file and modify it. * Alternatively, simply create a standard text file and save it as .yml with UTF-8 with BOM encoding. Various text editors, such as [https://www.notepad-plus-plus.org/ Notepad++] and [https://code.visualstudio.com/ Visual Studio Code], will allow you to manually save with encoding UTF-8 with BOM * The file name must end in "''_l_<language>''", with the language setting it will appear for * The first line of any localization file must also be <code>l_<language>:</code>. * Vanilla localization files do not need to be replaced, instead, simply add a new file with new entries * If you wish to change a vanilla localization, save your file within the "''replace''" folder. Any file in localization/replace will load after other localization files, and will overwrite any duplicate entries. * The number seen in vanilla files right after the colon can be omitted, as it is only useful for Paradox's internal translation tracking.<ref>https://twitter.com/Martin_Anward/status/1039175213773144066 </ref> * Each string to be displayed in game is encased in quotation marks. To display quotation marks in game, input a backslash before each quotation mark (for example: <code>text \"name\"</code>) * Note that the following unicode characters are invalid inside the localisation file and will generate a "?" instead: <code>„ “ ‚ ‘ – ” ’ … —</code> <pre> l_english: wonder_lighthouse_of_pharos:0 "Lighthouse of Alexandria" wonder_giza:0 "Giza Pyramid Complex" wonder_halicarnassus:0 "Mausoleum at Halicarnassus" wonder_tomb_of_alexander:0 "Mausoleum of Alexander" wonder_tomb_of_alexander_entity:0 "Mausoleum of Alexander" wonder_colossus:0 "Colossus of Rhodes" wonder_dodona_oracle:0 "Oracle of Dodona" wonder_library_of_alexandria:0 "Library of Alexandria" </pre> == Color Codes== Inserting a hastag(#) followed by a letter and a space will change the text color in any localization string, #! will reset the color to the default. Definitions for # codes can be found in jomini/gui/jomini/basetextformatting.txt {| class="wikitable sortable" ! Code !! Color !! Alternate Code(s) |- | #Y || <b style="color:#2B8ED9">Blue</b> || zero_value, Z |- | #G || <b style="color:#23BF20">Green</b> || positive_value, P |- | #R || <b style="color:#D2483B">Red</b> || negative_value, N |- | #TF || <b style="color:#D9D9D9">Light grey</b> || |- | #T || <b style="color:#D2D62C">Gold</b> || |- | #! || Default || |} == Text Icons== Inserting a @ followed by a text key and ! (<code>@icon_name!</code>) will place a text icon. Definitions for text icon codes can be found in gui/shared/font_icons.gui New icons can be added and defined in the gui/shared folder with <pre> texticon = { icon = icon_name iconsize = { texture = "gfx/interface/icons/font_icons/icon_name.dds" size = { 16 16 } offset = { 0 4 } fontsize = 16 } } </pre> {| class="wikitable sortable" ! Code !! Icon |- | @military_icon! || {{icon|Martial}} |- | @civic_icon! || {{icon|Civic}} |- | @oratory_icon! || {{icon|Charisma}} |- | @religious_icon! || {{icon|Zeal}} |} {{Modding navbox}} [[Category:模组制作]] [[en:Localization]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:Icon
(
查看源代码
)
Template:Icon/c
(
查看源代码
)
Template:Icon/m
(
查看源代码
)
Template:Icon/z
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
本地化
。
×
登录
密码
记住登录
加入英白拉多:罗马百科
忘记密码?
其他方式登录