From 44f68bcca23d9604d4a27f278e26474e9aae7308 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 4 Sep 2024 14:41:43 +0200 Subject: [PATCH] transfer language --- spcd/bootstrap.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index a80e0f8..48c0d67 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -905,7 +905,7 @@ spcd_query_package() { spcd_txt_locale() { local action="${1}" - local locale="${2}" + local chosen="${2}" set -- \ "LANG" \ "LC_CTYPE" \ @@ -919,6 +919,7 @@ spcd_txt_locale() { *) set -- \ "${@}" \ + "LANGUAGE" \ "LC_PAPER" \ "LC_NAME" \ "LC_ADDRESS" \ @@ -939,15 +940,19 @@ spcd_txt_locale() { "set") spcd_txt_locale "list" spcd_split - local value - if [ -n "${locale}" ]; then - value="${locale}" + local locale long + if [ -n "${chosen}" ]; then + locale="${chosen}" else - value="${_SPCD_TXT_LOCALE_DEFAULT}" + locale="${_SPCD_TXT_LOCALE_DEFAULT}" fi - value="${value}.${_SPCD_TXT_CHARSET}" + long="${locale}.${_SPCD_TXT_CHARSET}" for name in "${@}"; do - export "${name}=${value}" + if [ "${name}" != "LANGUAGE" ]; then + export "${name}=${long}" + else + export "${name}=${locale}" + fi done spcd_split spcd_txt_locale "list"