Discussion:
Lost in localization
(too old to reply)
Gilberto F da Silva
2022-06-26 01:20:13 UTC
Permalink
I'm having trouble getting the location right in Mageia 8. There are
two different locales. If I'm in text mode, the locale shows that I'm
using Brazilian Portuguese. Inside the konsole I get that I'm using the
Esperanto language.

Question: where do I configure the text mode locale and where do I
configure the graphics mode locale?
--
Gilberto F da Silva
David W. Hodgins
2022-06-26 02:33:07 UTC
Permalink
Post by Gilberto F da Silva
I'm having trouble getting the location right in Mageia 8. There are
two different locales. If I'm in text mode, the locale shows that I'm
using Brazilian Portuguese. Inside the konsole I get that I'm using the
Esperanto language.
Question: where do I configure the text mode locale and where do I
configure the graphics mode locale?
There are multiple ways locale is specified. At the system level, /etc/locale.conf,
/etc/sysconfig/i18n. Some desktop environments such as kde and gnome override
the system settings.

On my system ...
$ cat /etc/locale.conf
COUNTRY=CA
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en_GB:en

$ cat /etc/sysconfig/i18n
COUNTRY=CA
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en_GB:en
LC_ADDRESS=en_CA.UTF-8
LC_COLLATE=en_CA.UTF-8
LC_CTYPE=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MESSAGES=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
SYSFONT=lat0-16

$ cat ~/.config/plasma-localerc
[Formats]
LANG=en_CA.UTF-8
LC_COLLATE=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
useDetailed=true

[Translations]
LANGUAGE=en_GB:en_US

$ cat ~/.config/plasma-locale-settings.sh
# Generated script, do not edit
# Exports language-format specific env vars from startkde.
# This script has been generated from kcmshell5 formats.
# It will automatically be overwritten from there.
export LANG=en_CA.UTF-8
export LC_NUMERIC=en_CA.UTF-8
export LC_MONETARY=en_CA.UTF-8
export LC_MEASUREMENT=en_CA.UTF-8
export LC_COLLATE=en_CA.UTF-8
export LANGUAGE=en_GB:en_US

The first is set during the initial language selection during install. The second
by mcc.

The last two by systemsettings5. Don't edit them manually when logged into plasma
as that user.

The selection when setting them is limited based on the packages installed.

Regards, Dave Hodgins
Gilberto F da Silva
2022-06-26 19:49:50 UTC
Permalink
On Sat, 25 Jun 2022 21:20:13 -0400, Gilberto F da Silva
    I'm having trouble getting the location right in Mageia 8. There are
two different locales. If I'm in text mode, the locale shows that I'm
using Brazilian Portuguese. Inside the konsole I get that I'm using the
Esperanto language.
    Question: where do I configure the text mode locale and where do I
configure the graphics mode locale?   
There are multiple ways locale is specified. At the system level, /etc/locale.conf,
/etc/sysconfig/i18n. Some desktop environments such as kde and gnome override
the system settings.
On my system ...
$ cat /etc/locale.conf
COUNTRY=CA
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en_GB:en
$ cat /etc/sysconfig/i18n
COUNTRY=CA
LANG=en_CA.UTF-8
LANGUAGE=en_CA:en_GB:en
LC_ADDRESS=en_CA.UTF-8
LC_COLLATE=en_CA.UTF-8
LC_CTYPE=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MESSAGES=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
SYSFONT=lat0-16
I adjusted these two files for the Esperanto language. Now both the
text-mode locale and the konsole locale indicate Esperanto as a language.

cat /etc/locale.conf
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt


cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
LC_ADDRESS=eo.UTF-8
LC_COLLATE=eo.UTF-8
LC_CTYPE=eo.UTF-8
LC_IDENTIFICATION=eo.UTF-8
LC_MEASUREMENT=eo.UTF-8
LC_MESSAGES=eo.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=eo.UTF-8
LC_NUMERIC=eo.UTF-8
LC_PAPER=eo.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
--
Gilberto F da Silva
Gilberto F da Silva
2022-07-05 22:40:45 UTC
Permalink
Post by Gilberto F da Silva
I adjusted these two files for the Esperanto language. Now both the
text-mode locale and the konsole locale indicate Esperanto as a language.
cat /etc/locale.conf
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
LC_ADDRESS=eo.UTF-8
LC_COLLATE=eo.UTF-8
LC_CTYPE=eo.UTF-8
LC_IDENTIFICATION=eo.UTF-8
LC_MEASUREMENT=eo.UTF-8
LC_MESSAGES=eo.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=eo.UTF-8
LC_NUMERIC=eo.UTF-8
LC_PAPER=eo.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
The system was working with the desired location but returned to the old
location.


cat /etc/locale.conf
COUNTRY=BR
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt_PT:pt


cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt_PT:pt
LC_ADDRESS=pt_BR.UTF-8
LC_COLLATE=pt_BR.UTF-8
LC_CTYPE=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_MESSAGES=pt_BR.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_NUMERIC=pt_BR.UTF-8
LC_PAPER=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
--
Gilberto F da Silva
David W. Hodgins
2022-07-05 22:55:39 UTC
Permalink
Post by Gilberto F da Silva
Post by Gilberto F da Silva
I adjusted these two files for the Esperanto language. Now both the
text-mode locale and the konsole locale indicate Esperanto as a language.
cat /etc/locale.conf
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
LC_ADDRESS=eo.UTF-8
LC_COLLATE=eo.UTF-8
LC_CTYPE=eo.UTF-8
LC_IDENTIFICATION=eo.UTF-8
LC_MEASUREMENT=eo.UTF-8
LC_MESSAGES=eo.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=eo.UTF-8
LC_NUMERIC=eo.UTF-8
LC_PAPER=eo.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
The system was working with the desired location but returned to the old
location.
cat /etc/locale.conf
COUNTRY=BR
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt_PT:pt
cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt_PT:pt
LC_ADDRESS=pt_BR.UTF-8
LC_COLLATE=pt_BR.UTF-8
LC_CTYPE=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_MESSAGES=pt_BR.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_NUMERIC=pt_BR.UTF-8
LC_PAPER=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
That would not have been caused by any updates, it has to have been a result
of something run on that system. Neither of those files have been touched on
my installs in well over a year.

-rw-r--r-- 1 root root 52 Jan 6 2021 /etc/locale.conf
-rw-r--r-- 1 root root 349 Jul 13 2021 /etc/sysconfig/i18n

Any idea what caused it?

Regards, Dave Hodgins
Gilberto F da Silva
2022-07-06 00:33:21 UTC
Permalink
On Tue, 05 Jul 2022 18:40:45 -0400, Gilberto F da Silva
Post by Gilberto F da Silva
Post by Gilberto F da Silva
I adjusted these two files for the Esperanto language. Now both the
text-mode locale and the konsole locale indicate Esperanto as a language.
cat /etc/locale.conf
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=eo.UTF-8
LANGUAGE=eo:pt_BR:pt_PT:pt
LC_ADDRESS=eo.UTF-8
LC_COLLATE=eo.UTF-8
LC_CTYPE=eo.UTF-8
LC_IDENTIFICATION=eo.UTF-8
LC_MEASUREMENT=eo.UTF-8
LC_MESSAGES=eo.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=eo.UTF-8
LC_NUMERIC=eo.UTF-8
LC_PAPER=eo.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
The system was working with the desired location but returned to the old
location.
    
cat /etc/locale.conf
COUNTRY=BR
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt_PT:pt
cat /etc/sysconfig/i18n
COUNTRY=BR
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt_PT:pt
LC_ADDRESS=pt_BR.UTF-8
LC_COLLATE=pt_BR.UTF-8
LC_CTYPE=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_MESSAGES=pt_BR.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_NUMERIC=pt_BR.UTF-8
LC_PAPER=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
SYSFONT=lat1-16
That would not have been caused by any updates, it has to have been a result
of something run on that system. Neither of those files have been touched on
my installs in well over a year.
-rw-r--r-- 1 root root 52 Jan  6  2021 /etc/locale.conf
-rw-r--r-- 1 root root 349 Jul 13  2021 /etc/sysconfig/i18n
Any idea what caused it?
The location in the Mageia is somewhat confused. Perhaps it makes sense
to those who programmed this. In MCC only two languages appear:
Portuguese and English. I don't know how to add languages to MCC. I
suppose the MCC settings regarding languages overwrite the system settings.
--
Gilberto F da Silva
David W. Hodgins
2022-07-06 01:16:28 UTC
Permalink
Post by Gilberto F da Silva
The location in the Mageia is somewhat confused. Perhaps it makes sense
Portuguese and English. I don't know how to add languages to MCC. I
suppose the MCC settings regarding languages overwrite the system settings.
Install the locales-eo package. Then mcc should show it as an option for selection.

Regards, Dave Hodgins
Gilberto F da Silva
2022-07-06 02:20:45 UTC
Permalink
On Tue, 05 Jul 2022 20:33:21 -0400, Gilberto F da Silva
Post by Gilberto F da Silva
The location in the Mageia is somewhat confused. Perhaps it makes sense
Portuguese and English. I don't know how to add languages to MCC. I
suppose the MCC settings regarding languages overwrite the system settings.
Install the locales-eo package. Then mcc should show it as an option for selection.
It is already installed but does not appear in mcc.
--
Gilberto F da Silva
David W. Hodgins
2022-07-06 02:52:28 UTC
Permalink
Post by Gilberto F da Silva
On Tue, 05 Jul 2022 20:33:21 -0400, Gilberto F da Silva
Post by Gilberto F da Silva
The location in the Mageia is somewhat confused. Perhaps it makes sense
Portuguese and English. I don't know how to add languages to MCC. I
suppose the MCC settings regarding languages overwrite the system settings.
Install the locales-eo package. Then mcc should show it as an option for selection.
It is already installed but does not appear in mcc.
It's a bug in the locales-eo package with the way mcc looks for the language.
Esperanto is eo_XX, with the XX meaning it is not a country specific version
of a language.

Workaround until it's fixed. As root run the command
ln -s /usr/share/locale/eo /usr/share/locale/eo_XX

I've opened https://bugs.mageia.org/show_bug.cgi?id=30614 to get it fixed.

Regards, Dave Hodgins
Gilberto F da Silva
2022-07-06 04:32:26 UTC
Permalink
On Tue, 05 Jul 2022 22:20:45 -0400, Gilberto F da Silva
Post by Gilberto F da Silva
On Tue, 05 Jul 2022 20:33:21 -0400, Gilberto F da Silva
Post by Gilberto F da Silva
The location in the Mageia is somewhat confused. Perhaps it makes sense
Portuguese and English. I don't know how to add languages to MCC. I
suppose the MCC settings regarding languages overwrite the system settings.
Install the locales-eo package. Then mcc should show it as an option for selection.
It is already installed but does not appear in mcc.
It's a bug in the locales-eo package with the way mcc looks for the language.
Esperanto is eo_XX, with the XX meaning it is not a country specific version
of a language.
Workaround until it's fixed. As root run the command
ln -s /usr/share/locale/eo /usr/share/locale/eo_XX
I've opened https://bugs.mageia.org/show_bug.cgi?id=30614 to get it fixed.
Great! Now the Esperanto language appears in mcc.

Now I need to translate more files to this language.
--
Gilberto F da Silva
faeychild
2022-06-26 21:58:47 UTC
Permalink
Post by Gilberto F da Silva
I'm having trouble getting the location right in Mageia 8. There are
two different locales. If I'm in text mode, the locale shows that I'm
using Brazilian Portuguese. Inside the konsole I get that I'm using the
Esperanto language.
Question: where do I configure the text mode locale and where do I
configure the graphics mode locale?
I get an inconsistency with time format
In Dolphin the start time of a file is in 24 hour format and the end is
in 12 hour format. Odd!
--
faeychild
Running plasmashell 5.20.4 on 5.15.46-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64 installed via Mageia-8-x86_64-DVD.iso
David W. Hodgins
2022-06-27 00:22:47 UTC
Permalink
Post by faeychild
I get an inconsistency with time format
In Dolphin the start time of a file is in 24 hour format and the end is
in 12 hour format. Odd!
In /etc/profile.d I wrote a file called zlocal.sh (make sure it's executable).
Using a name starting with z ensures it's executed after all of the other scripts
run during login. I set ...

# grep TIME /etc/profile.d/zlocal.sh
export LC_TIME=en_DK.UTF-8 # Show date as yyyy-mm-dd

I think that only affects ls and other bash commands.

In systemsettings5, under the regional settings/formats, select Denmark - English
for the time. That gives a 4 digit year, 24 hour clock, no "AM" or "PM.
I haven't found a way to set it to ymd instead of d/m/y though.

Regards, Dave Hodgins
Loading...