~新手引导添加语言选择

This commit is contained in:
juewuy
2026-04-19 11:16:35 +08:00
parent 85733ebf9d
commit accc20ff7c
2 changed files with 25 additions and 4 deletions

View File

@@ -203,8 +203,8 @@ settings() {
exit 0
;;
b)
comp_box "1) $SET_LANG_ZH" \
"2) $SET_LANG_EN" \
comp_box "1) 简体中文" \
"2) English" \
"" \
"0) $COMMON_BACK"
read -r -p "$COMMON_INPUT> " num

View File

@@ -4,7 +4,26 @@
[ -n "$__IS_MODULE_USERGUIDE_LOADED" ] && return
__IS_MODULE_USERGUIDE_LOADED=1
load_lang userguide
. "$CRASHDIR"/libs/check_dir_avail.sh
select_lang() {
line_break
comp_box "1) 简体中文" \
"2) English"
read -r -p "请选择语言 Please choose your language > " num
case "$num" in
1)
echo chs >"$CRASHDIR"/configs/i18n.cfg
;;
2)
echo en >"$CRASHDIR"/configs/i18n.cfg
;;
esac
line_break
load_lang menu
load_lang common
load_lang userguide
}
forwhat() {
while true; do
@@ -89,7 +108,9 @@ forwhat() {
# 新手引导
userguide() {
. "$CRASHDIR"/libs/check_dir_avail.sh
select_lang
forwhat
# 检测小内存模式