mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
feat(i18n): 添加多语言支持功能
- 新增国际化系统,支持中英文切换 - 添加语言选择对话框和语言切换按钮回调 - 扩展配置系统以支持语言设置存储 - 创建语言文件目录结构和占位文件 - 更新主窗口支持UI文本动态刷新
This commit is contained in:
@@ -9,8 +9,10 @@
|
||||
#include "utils/error_code.h"
|
||||
#include "utils/safe_string.h"
|
||||
#include "utils/logger.h"
|
||||
#include "utils/i18n.h"
|
||||
#include "ui/ui_utils.h"
|
||||
#include "ui/dialogs.h"
|
||||
#include "ui/main_window.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -574,6 +576,15 @@ void load_all_paths(void)
|
||||
IupSetAttribute(lbl_status, "TITLE", lua_config_get_string("status", "loaded"));
|
||||
}
|
||||
|
||||
// 按钮回调:语言切换
|
||||
int btn_lang_cb(Ihandle *self)
|
||||
{
|
||||
Ihandle *dlg = IupGetDialog(self);
|
||||
language_select_dialog();
|
||||
refresh_main_window_ui(dlg);
|
||||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
// 按钮回调:帮助
|
||||
int btn_help_cb(Ihandle *self)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user