Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwillow committed Jan 3, 2024
1 parent 461d047 commit fb64602
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ v0.8 Rearrange the interface (thanks to [Carlos Sánchez](https://github.com/c-s
Support multiple languages (built-in Simplified Chinese and English).
Add multi-language selection(to click "hammer" button - Language).

v0.81 Add Spanish language pack support (thanks to [Carlos Sánchez](https://github.com/c-sanchez)).

# Build

1. Confirm the compilation environment: win10+ x64, Visual Studio 2019+, cmake.
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,14 @@ v0.7 支持命令行。使用 $ ./SmartCharsetConverter --help 查看命令行
v0.71 修复命令行用不了的bug。

v0.72 解决添加大文件会卡死的问题(只探测文件前100KB)。
后缀过滤模式现在支持更多的模式了(支持以`*.` `.` `空格` `|`分隔)。修复后缀过滤模式的其他问题。
后缀过滤模式现在支持更多的模式了(支持以 `*.` `.` `空格` `|`分隔)。修复后缀过滤模式的其他问题。

v0.8 重新编排界面(感谢[Carlos Sánchez](https://github.com/c-sanchez))。
增加配置文件,现在界面改动会保留在配置文件中了。
支持多语言(内置简体中文和英文)。增加多语言选择。

v0.81 增加西班牙语支持(感谢[Carlos Sánchez](https://github.com/c-sanchez))。

# 构建方法

1. 确认编译环境:win10+ x64, Visual Studio 2019+, cmake。
Expand All @@ -80,12 +82,17 @@ v0.8 重新编排界面(感谢[Carlos Sánchez](https://github.com/c-sanchez))

1. 在src/Resource/lang_embed下找到xxx.json文件。
2. 复制xxx.json文件并修改内容。文件名可以随意取,程序并不依赖语言文件的文件名。

> xxx.json文件必须是utf-8编码。
3. 修改内容时注意langId字段,从[[MS-LCID]: Windows Language Code Identifier (LCID) Reference](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f?redirectedfrom=MSDN)处下载pdf,翻阅至`2.2 LCID Structure - Language ID (2 bytes)`一节,找到目标语言对应的Language ID。`例如:0x409对应于en-US,0x804对应于zh-CN。`然后把16进制转换为10进制填入langId字段。`例如0x409则填入1033,0x804则填入2052`
这个Language ID和操作系统设置有关,正确填写的话,程序启动时会根据操作系统设置自动加载对应的语言文件(前提条件是没有在程序中设置过语言,如果在程序中设置过语言,那么以设置的为准)。
3. 修改内容时注意langId字段,从[[MS-LCID]: Windows Language Code Identifier (LCID) Reference](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f?redirectedfrom=MSDN)处下载pdf,翻阅至 `2.2 LCID Structure - Language ID (2 bytes)`一节,找到目标语言对应的Language ID。`例如:0x409对应于en-US,0x804对应于zh-CN。`然后把16进制转换为10进制填入langId字段。`例如0x409则填入1033,0x804则填入2052`
这个Language ID和操作系统设置有关,正确填写的话,程序启动时会根据操作系统设置自动加载对应的语言文件(前提条件是没有在程序中设置过语言,如果在程序中设置过语言,那么以设置的为准)。

> 如果你不知道langId应该填什么,那么可以填0。
4. 把你的xxx.json语言文件放置在SmartCharsetConverter.exe所在目录的lang目录(如果没有则新建一个)下,程序启动时会自动检查并加载。
> 注意:程序中内置了一些语言包(位于`src/Resource/lang_embed`),如果lang目录下的语言包的language字段和内置的某个语言包一样,那么程序在启动时将以lang目录下的语言包文件为准。

> 注意:程序中内置了一些语言包(位于 `src/Resource/lang_embed`),如果lang目录下的语言包的language字段和内置的某个语言包一样,那么程序在启动时将以lang目录下的语言包文件为准。
现在你可以启动程序查看效果了!

Expand Down

0 comments on commit fb64602

Please sign in to comment.