From 1633fe0dfe83ed5a4358c9070e72d0f10855daf5 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:10:53 +0100 Subject: [PATCH] Update utils.sh --- scripts/utils.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/utils.sh b/scripts/utils.sh index b991c07..eaf07cd 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -37,8 +37,6 @@ HOLD="-" CM="${GN}✓${CL}" TAB=" " -# Default language -LANGUAGE="${LANGUAGE:-en}" # Create and display spinner spinner() { @@ -87,6 +85,12 @@ initialize_cache() { fi } +load_language() { + if [ -f "$CONFIG_FILE" ]; then + LANGUAGE=$(jq -r '.language' "$CONFIG_FILE") + fi +} + # Translation with cache and predefined terms translate() { local text="$1"