LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-14-2022, 05:22 AM   #1
ehsanamini
LQ Newbie
 
Registered: Apr 2022
Posts: 3

Rep: Reputation: 0
Setting the language and locale in Gnome on Debian-Bullseye has no effect


I have a machine with Gnome on Bullseye. I set both Language and the Formats to German and Germany respectively in the Region and Language section of Settings GUI. After I restart the session, everything is still in English. The value of Language and Format fields are shown as German but the environment is still in English. This is on a non-admin account, but I have access to root.

When I run locale at the terminal I get:

LANG=de_DE.UTF-8
LANGUAGE=en_US:en
Everyhting else is set to de_DE.UTF-8

LC_ALL is not set (set to nothing).

Also I notice that on the Login screen, the day is shown in German and months names in Calendar are in German, but most everything else (menus, options, messages, etc.) is in English.
 
Old 04-14-2022, 07:06 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
try
https://wiki.debian.org/Locale#:~:te...2Fetc%2Flocale.

Note files that affect languages include /etc/profile.d/something and home .profile

so get root and try
Code:
dpkg-reconfigure locales
 
Old 04-15-2022, 12:39 AM   #3
ehsanamini
LQ Newbie
 
Registered: Apr 2022
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply. Already tried that.
Somebody suggested that I should edit /etc/default/locale.
I did that and it seemed to work, with the caveat that now my admin account also changed language to German.
Then as per suggestion on Debian wiki, I ran dpkg-reconfigure and set the default to None.
It just comments out the LANG line in /etc/default/locale.
I also set the relevant fields in the Region and Language section of the Settings GUI.
After logout and login the admin account remained German, while the account that I wished to turn to German is back in English.
Following the other suggestions on Debian wiki, I tried the ~/.dmrc solution which did not work.

I added the line
Code:
: "${LANG:=en_US.UTF-8}"; export LANG
to /etc/profile, but this broke the system so that I could no longer login. I had to remove it. (also tried it without the colon at the beginning, same result)

Right now, the account I had tried to change to German is in English, whereas the account that was supposed to be in German is in English. The settings GUI shows the right values, but the desktop environment ignores them. I can only characterize this as a bug.
 
Old 04-15-2022, 01:19 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ something is very wrong about that line.

I suspect that GNOME cuts through long-established standards and uses its own settings:
https://help.gnome.org/users/gnome-h...nguage.html.en
 
Old 04-19-2022, 01:36 PM   #5
ehsanamini
LQ Newbie
 
Registered: Apr 2022
Posts: 3

Original Poster
Rep: Reputation: 0
For all those who later come upon this thread. Here's the right way to do it:

Edit the ~/.profile (on the home directory of the user whose desktop environment must be switched to another language) and paste the following: (this sample is for German, adapt the RHS values for your desired language)

LANG=de_DE.UTF-8
LANGUAGE=de_DE:de
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

And that's it.
 
Old 04-19-2022, 02:06 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ I believe that that fixed it for you, and well done, but really there's something borked on a higher level. This sort of workaround shouldn't be required.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "Perl: warning: Setting locale failed". Locale not available. tux_addict Debian 7 11-10-2018 11:33 AM
cannot lock locale archive "/usr/lib64/locale/locale-archive": Permission denied when building Multilib Cross Linux from Scratch Gunnersky2002 Linux - Software 2 06-13-2018 09:28 AM
How to change the locale by setting the system default locale letdoit Slackware 6 08-18-2011 03:34 AM
Locale and language setting stefaandk Linux - General 2 07-10-2005 11:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration