支持多语言

This commit is contained in:
不吃油炸鸡
2026-01-28 19:45:01 +08:00
parent 8dac353de4
commit 47a0d91bcf
3 changed files with 52 additions and 19 deletions

View File

@@ -90,7 +90,10 @@ void ui_init(void)
// internationalization init
lv_i18n_init(lv_i18n_language_pack); //lv_i18n 的语言初始化
lv_i18n_set_locale("en"); //lv_i18n 设置当前语言
if(ui_get_language_select() == 0)
lv_i18n_set_locale("en"); //lv_i18n 设置当前语言
else
lv_i18n_set_locale("zh-cn"); //lv_i18n 设置当前语言
// main timer (you can add someting to do in the timer_cb if needed)
lv_timer_t * ui_MainTimer = lv_timer_create(main_timer_cb, 1000, NULL);