You are not logged in.

#1 2015-08-12 15:41:46

theLadder
Member
Registered: 2014-10-05
Posts: 18

XFCE GUI has wrong language when launched with LightDM

If i launch XFCE with the "startxfce4" command, i get the GUI in swedish as i want.
When i launch XFCE from LightDM, the GUI is in english.
For example, when i open thunar, the file manager, the top row says:
"File Edit View Go Help", this should be in swedish, as it is with the startxfce4 command.

How can i fix this?

martin@martins_dator [~] $ locale
locale: Kan inte stta LC_ALL till standardlokalen: Filen eller katalogen finns inte
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE=c
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=

martin@martins_dator [~] $ echo $LANG
sv_SE.UTF-8

martin@martins_dator [~] $ cat /etc/locale.conf 
LANG=sv_SE.UTF-8
#LANG=en_US.UTF-8
LC_COLLATE=c

martin@martins_dator [~] $ cat .config/locale.conf 
LANG=sv_SE.UTF-8

martin@martins_dator [~] $ cat .profile 
export LANG=sv_SE.UTF-8

martin@martins_dator [~] $ cat .bash_profile 
...
export LANG=sv_SE.UTF-8

martin@martins_dator [~] $ cat .bashrc
...
export XDG_CONFIG_HOME="~/.config"
export LANG=sv_SE.UTF-8

martin@martins_dator [~] $ cat .dmrc 
[Desktop]
Language=sv_SE.utf8
Session=xfce

martin@martins_dator [~] $ cat /etc/enviroment
...
LANG=sv_SE.UTF-8

Last edited by theLadder (2015-08-12 17:17:45)

Offline

#2 2015-08-12 15:44:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: XFCE GUI has wrong language when launched with LightDM

https://wiki.archlinux.org/index.php/Li … _displayed ?

When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Run

LC_ALL=C <command>

to get the output in English.

Offline

#3 2015-08-12 15:51:34

theLadder
Member
Registered: 2014-10-05
Posts: 18

Re: XFCE GUI has wrong language when launched with LightDM

Thanks for the help, i edited my post.

I already have "LANG=sv_SE.UTF-8" in my /etc/enviroment, just forgot to include it in my post.
So that did not fix the problem for me sad

Offline

#4 2015-08-12 16:13:17

theLadder
Member
Registered: 2014-10-05
Posts: 18

Re: XFCE GUI has wrong language when launched with LightDM

After some more testing i noticed something strange:
From LightDM i get a error message, and LC_COLLATE=c
This does not happen with the "startxfce4" command
Not sure what this means though tongue
Maybe LightDM does not read the user locale.conf, only the global one?
Still strange that i get english GUI.

Launched from "startxfce4" command:
martin@martins_dator [~] $ locale
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
...

Launched from LightDM:
martin@martins_dator [~] $ locale
locale: Kan inte stta LC_ALL till standardlokalen: Filen eller katalogen finns inte
locale: Cannot set LC_ALL to default locale: No such file or directory         # translated by me for this post
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE=c
...

Oh, and "LC_ALL=C locale" does not give a useful output, it just says C on every line.

Last edited by theLadder (2015-08-12 16:14:11)

Offline

#5 2015-08-12 16:16:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: XFCE GUI has wrong language when launched with LightDM

theLadder wrote:

Oh, and "LC_ALL=C locale" does not give a useful output, it just says C on every line.

Indeed <scratches head>

$ LC_ALL=C locale
LANG=en_XX.UTF-8@POSIX
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
~ $ locale
LANG=en_XX.UTF-8@POSIX
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_XX.UTF-8@POSIX"
LC_TIME="en_XX.UTF-8@POSIX"
LC_COLLATE="en_XX.UTF-8@POSIX"
LC_MONETARY="en_XX.UTF-8@POSIX"
LC_MESSAGES="en_XX.UTF-8@POSIX"
LC_PAPER="en_XX.UTF-8@POSIX"
LC_NAME="en_XX.UTF-8@POSIX"
LC_ADDRESS="en_XX.UTF-8@POSIX"
LC_TELEPHONE="en_XX.UTF-8@POSIX"
LC_MEASUREMENT="en_XX.UTF-8@POSIX"
LC_IDENTIFICATION="en_XX.UTF-8@POSIX"
LC_ALL=

What's the output of

localectl

Edit: The error in 'locale' output is due to 'LC_COLLATE=c'. You need a capital 'C' there.

Last edited by karol (2015-08-12 16:38:39)

Offline

#6 2015-08-12 17:02:44

theLadder
Member
Registered: 2014-10-05
Posts: 18

Re: XFCE GUI has wrong language when launched with LightDM

karol wrote:

Edit: The error in 'locale' output is due to 'LC_COLLATE=c'. You need a capital 'C' there.

That was it! Changing lower case "c" to upper case "C" made it work! Now my GUI is in swedish, yay! big_smile
I guess lightdm reverted back to english because there was an error in /etc/locale.conf

It still makes no difference what language i choose in LightDM, but thats a problem i can live with, so thanks for the help smile

EDIT:  I have to put "LANG=sv_SE.UTF-8" in /etc/enviroment like the LightDM wiki-page says to get swedish. It would be nice to be able to choose english or swedish from LightDM, so if anyone knows how to make that work, please tell me smile

Last edited by theLadder (2015-08-12 17:17:28)

Offline

#7 2015-08-13 05:14:14

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: XFCE GUI has wrong language when launched with LightDM

It would be nice to be able to choose english or swedish from LightDM

if your using lightdm-gtk-greeter look for ~language for indicators

# Panel:
#  panel-position = top|bottom ("top" by default)
#  clock-format = strftime-format string, e.g. %H:%M
#  indicators = semi-colon ";" separated list of allowed indicator modules. Built-in indicators include "~a11y", "~language", "~session", "~power", "~clock", "~host", "~spacer". Unity indicators can be represented by short name (e.g. "sound", "power"), service file name, or absolute path

example:
indicators=~language;~session;~power

edit: file

/etc/lightdm/lightdm-gtk-greeter.conf

Last edited by Malkymder (2015-08-13 05:16:42)

Offline

#8 2015-08-13 06:53:41

theLadder
Member
Registered: 2014-10-05
Posts: 18

Re: XFCE GUI has wrong language when launched with LightDM

Malkymder wrote:

if your using lightdm-gtk-greeter look for ~language for indicators

Perhaps i did not explain my problem well enough. Let me try again:
I do have the option in lightdm to select swedish or english, it just does not make any difference what language i choose.
That is, If i choose english in lightdm when i log in, it still gives me swedish.

Offline

Board footer

Powered by FluxBB