~Add i18n support (only menu.sh)

This commit is contained in:
juewuy
2026-01-08 18:46:41 +08:00
parent 6b34654705
commit 2e1744a993
3 changed files with 170 additions and 69 deletions

8
scripts/libs/i18n.sh Normal file
View File

@@ -0,0 +1,8 @@
load_lang() {
i18n=$(cat "$CRASHDIR"/configs/i18n.cfg 2>/dev/null)
[ -z "$i18n" ] && i18n=chs
file="$CRASHDIR/lang/$i18n/$1.lang"
[ -s "$file" ] && . "$file"
}