On Wed, Nov 1, 2023 at 5:11 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Hi,
I have modified .bashrc thus:
if [ $XDG_CURRENT_DESKTOP = KDE ]; then . ~/.i18n echo "changing the locale to .i18n" fi
That part works. At least it runs.
The .i18n file is:
# Add user specific LANG and LC_* variables here # LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES # LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT # LC_IDENTIFICATION LC_ALL # # export LANG=en_US.UTF-8
LC_TIME="en_DK.UTF-8"
LC_MONETARY="es_ES@euro" LC_TELEPHONE="es_ES@euro" LC_MEASUREMENT="es_ES@euro"
LC_MONETARY="es_ES.Utf8" LC_TELEPHONE="es_ES.utf8" LC_MEASUREMENT="es_ES.utf8" LC_NAME="es_ES.utf8" LC_ADDRESS="es_ES.utf8"
LC_ALL=en_US.UTF-8 cer@Laicolasse:~>
When I open a new tab in konsole, or open a new xterm, I notice that the vars are exported:
changing the locale to .i18n cer@Laicolasse:~> locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC=es_ES.UTF-8 LC_TIME=en_DK.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=es_ES.Utf8 LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE=es_ES.utf8 LC_MEASUREMENT=es_ES.utf8 LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= cer@Laicolasse:~>
But not all of them.
Notice that in LC_MONETARY I did a tiny modification (es_ES.Utf8) writing "utf" as "Utf". I did that silly change to see if the var was exported. Now notice "LC_NAME". In the .i18n file, it is "es_ES.utf8", but in the output of locale it is getting "en_US.UTF-8".
Why, what is going on?
You need to export them. Show env | grep -E 'LANG|LC_'
maybe KDE overwriting it _after_ .bashrc runs? Is that var immutable?
-- Cheers / Saludos,
Carlos E. R.
(from openSUSE 15.5 (Laicolasse))