Godot本地化

main
Yogi 2023-10-27 16:13:00 +08:00
parent c49f88a991
commit 95c7ff99a8
4 changed files with 29 additions and 14 deletions

View File

@ -4,17 +4,17 @@
"type": "split", "type": "split",
"children": [ "children": [
{ {
"id": "f357cbfd38a8fcd6", "id": "71e57ba867937b57",
"type": "tabs", "type": "tabs",
"children": [ "children": [
{ {
"id": "a85683c1d4127620", "id": "5e6e04e0870d7cdb",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "积极心理.md", "file": "Godot 中文教程.md",
"mode": "preview", "mode": "source",
"source": false "source": false
} }
} }
@ -69,7 +69,7 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 300 "width": 200
}, },
"right": { "right": {
"id": "94db76309491c04e", "id": "94db76309491c04e",
@ -85,7 +85,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "积极心理.md", "file": "Godot 中文教程.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -102,7 +102,7 @@
"state": { "state": {
"type": "outgoing-link", "type": "outgoing-link",
"state": { "state": {
"file": "积极心理.md", "file": "Godot 中文教程.md",
"linksCollapsed": false, "linksCollapsed": false,
"unlinkedCollapsed": true "unlinkedCollapsed": true
} }
@ -125,7 +125,7 @@
"state": { "state": {
"type": "outline", "type": "outline",
"state": { "state": {
"file": "积极心理.md" "file": "Godot 中文教程.md"
} }
} }
} }
@ -134,7 +134,8 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 300 "width": 300,
"collapsed": true
}, },
"left-ribbon": { "left-ribbon": {
"hiddenItems": { "hiddenItems": {
@ -148,12 +149,12 @@
"workspaces:Manage workspace layouts": false "workspaces:Manage workspace layouts": false
} }
}, },
"active": "137da4fcbfeb0f20", "active": "5e6e04e0870d7cdb",
"lastOpenFiles": [ "lastOpenFiles": [
"TODO.md",
"积极心理.md", "积极心理.md",
"dwm桌面.md", "dwm桌面.md",
"WorldTreeModule.md", "WorldTreeModule.md",
"TODO.md",
"TODO模板.md", "TODO模板.md",
"Watching List.md", "Watching List.md",
"Godot 中文教程.md" "Godot 中文教程.md"

View File

@ -9,3 +9,19 @@
- [英文 制作点击饼干游戏 包含几乎全节点功能介绍 机翻](https://www.bilibili.com/video/BV1Ju4y1x7G3/?vd_source=ba468568caebc92479698e83c28be8b0) - [英文 制作点击饼干游戏 包含几乎全节点功能介绍 机翻](https://www.bilibili.com/video/BV1Ju4y1x7G3/?vd_source=ba468568caebc92479698e83c28be8b0)
- [中文 godot ui和主题的简单介绍_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1J14y1X7o7/?vd_source=ba468568caebc92479698e83c28be8b0) - [中文 godot ui和主题的简单介绍_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1J14y1X7o7/?vd_source=ba468568caebc92479698e83c28be8b0)
- [主题 手册](https://docs.godotengine.org/zh_CN/4.x/tutorials/ui/gui_skinning.html) - [主题 手册](https://docs.godotengine.org/zh_CN/4.x/tutorials/ui/gui_skinning.html)
## 本地化
流程:
1. 准备不同语言的字体文件
2. 准备翻译的csv文本文件, 第一行第一个为空, 第二行以及之后为语言的key 详情请看:[Locale codes](https://docs.godotengine.org/en/4.1/tutorials/i18n/locales.html) 然后第一列为游戏内的字符串 Key, 不能有回车, 需要完全一致才能翻译成功. 确保csv为utf-8 csv格式
3. 导入csv到游戏中去, 在 ProjectSetting/Localization 中配置csv同目录下自动生成的那些本地化资源
4. 在Theme中把字体进行设置, 动态字体, 赋予字体与Fallback字体, 保证字体可以正常显示
5. 脚本中调用 LocalxxServer.xxx 传入语言的key 可以切换不同语言
## Reference
[Internationalize Your Game Using Godots Localization Tools | Lets Learn Godot 3.5 - YouTube](https://www.youtube.com/watch?v=1Pxa5WgVLio)
[Browse Fonts - Google Fonts](https://fonts.google.com/?preview.text=hello&sort=popularity)
[Google Docs](https://docs.google.com/)
[Deepl](https://www.deepl.com/)
[Locale codes — Godot Engine (4.1) documentation in English](https://docs.godotengine.org/en/4.1/tutorials/i18n/locales.html#list-of-supported-country-codes)

View File

@ -1,4 +1,4 @@
## 2013-10-14 ## 2013-10-27
- [x] 做好 Signal up 的解决方案文档 - [x] 做好 Signal up 的解决方案文档
- [x] 把游戏的UI流程进行一个梳理与绘图 - [x] 把游戏的UI流程进行一个梳理与绘图

View File

@ -1,5 +1,3 @@
## 第一次阅读总结 ## 第一次阅读总结
- 对自己进行洗脑, 让自己喜欢上自己应该做的事情. - 对自己进行洗脑, 让自己喜欢上自己应该做的事情.
- 对自己所做的事情能得到的 Reward 具体到每一个细节, 并且用上很多的 Positive 形容词 - 对自己所做的事情能得到的 Reward 具体到每一个细节, 并且用上很多的 Positive 形容词