mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
4fe7dc47e4
- 新增国际化系统,支持中英文切换 - 添加语言选择对话框和语言切换按钮回调 - 扩展配置系统以支持语言设置存储 - 创建语言文件目录结构和占位文件 - 更新主窗口支持UI文本动态刷新
24 lines
424 B
C
24 lines
424 B
C
#ifndef I18N_H
|
|
#define I18N_H
|
|
|
|
#include <libintl.h>
|
|
#include <locale.h>
|
|
|
|
#ifndef _
|
|
#define _(s) gettext(s)
|
|
#endif
|
|
|
|
// 初始化国际化系统
|
|
void i18n_init(const char* default_lang);
|
|
|
|
// 检测系统语言并返回语言代码
|
|
const char* i18n_detect_system_language(void);
|
|
|
|
// 切换语言
|
|
void i18n_change_language(const char* lang);
|
|
|
|
// 获取当前语言
|
|
const char* i18n_get_current_language(void);
|
|
|
|
#endif // I18N_H
|