transfer language
This commit is contained in:
parent
56b9215ef3
commit
44f68bcca2
1 changed files with 12 additions and 7 deletions
|
@ -905,7 +905,7 @@ spcd_query_package() {
|
||||||
|
|
||||||
spcd_txt_locale() {
|
spcd_txt_locale() {
|
||||||
local action="${1}"
|
local action="${1}"
|
||||||
local locale="${2}"
|
local chosen="${2}"
|
||||||
set -- \
|
set -- \
|
||||||
"LANG" \
|
"LANG" \
|
||||||
"LC_CTYPE" \
|
"LC_CTYPE" \
|
||||||
|
@ -919,6 +919,7 @@ spcd_txt_locale() {
|
||||||
*)
|
*)
|
||||||
set -- \
|
set -- \
|
||||||
"${@}" \
|
"${@}" \
|
||||||
|
"LANGUAGE" \
|
||||||
"LC_PAPER" \
|
"LC_PAPER" \
|
||||||
"LC_NAME" \
|
"LC_NAME" \
|
||||||
"LC_ADDRESS" \
|
"LC_ADDRESS" \
|
||||||
|
@ -939,15 +940,19 @@ spcd_txt_locale() {
|
||||||
"set")
|
"set")
|
||||||
spcd_txt_locale "list"
|
spcd_txt_locale "list"
|
||||||
spcd_split
|
spcd_split
|
||||||
local value
|
local locale long
|
||||||
if [ -n "${locale}" ]; then
|
if [ -n "${chosen}" ]; then
|
||||||
value="${locale}"
|
locale="${chosen}"
|
||||||
else
|
else
|
||||||
value="${_SPCD_TXT_LOCALE_DEFAULT}"
|
locale="${_SPCD_TXT_LOCALE_DEFAULT}"
|
||||||
fi
|
fi
|
||||||
value="${value}.${_SPCD_TXT_CHARSET}"
|
long="${locale}.${_SPCD_TXT_CHARSET}"
|
||||||
for name in "${@}"; do
|
for name in "${@}"; do
|
||||||
export "${name}=${value}"
|
if [ "${name}" != "LANGUAGE" ]; then
|
||||||
|
export "${name}=${long}"
|
||||||
|
else
|
||||||
|
export "${name}=${locale}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
spcd_split
|
spcd_split
|
||||||
spcd_txt_locale "list"
|
spcd_txt_locale "list"
|
||||||
|
|
Loading…
Reference in a new issue