From 22b9bfeaecd61167ce048ea06a396804add2aa10 Mon Sep 17 00:00:00 2001 From: Wolfgang Baird Date: Sat, 11 Apr 2015 10:53:40 -0700 Subject: [PATCH] basic support for languages --- main.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.sh b/main.sh index 569a7c8..b051685 100755 --- a/main.sh +++ b/main.sh @@ -350,10 +350,16 @@ chk0.default = $login_enabled" # Directories scriptDirectory=$(cd "${0%/*}" && echo $PWD) -app_windows="$scriptDirectory"/windows/en app_directory="$scriptDirectory" for i in {1..2}; do app_directory=$(dirname "$app_directory"); done +lang=$(locale | grep LANG | cut -d\" -f2 | cut -d_ -f1) +if [[ -e "$scriptDirectory"/windows/"$lang" ]]; then + app_windows="$scriptDirectory"/windows/"$lang" +else + app_windows="$scriptDirectory"/windows/en +fi + # Files dboot_efi="$scriptDirectory"/boot.efi helper_1="$app_directory"/Contents/Resources/"dBoot Agent".sh