From c794d5d7fb4615a1881a3014df0e12790bc0ca0e Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:43:49 +0100 Subject: [PATCH] Update main_menu.sh --- scripts/menus/main_menu.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/menus/main_menu.sh b/scripts/menus/main_menu.sh index 2a257d2..584b25f 100644 --- a/scripts/menus/main_menu.sh +++ b/scripts/menus/main_menu.sh @@ -34,6 +34,13 @@ initialize_cache() { fi } + Load language from JSON file +load_language() { + if [ -f "$CONFIG_FILE" ]; then + LANGUAGE=$(jq -r '.language' "$CONFIG_FILE") + fi +} + show_menu() { while true; do OPTION=$(whiptail --title "$(translate "Main Menu")" --menu "$(translate "Select an option:")" 15 60 5 \ @@ -59,5 +66,6 @@ done # Main flow initialize_cache +load_language show_menu