0

I just installed openSUSE Leap 42.2. I'm struggling with the language settings.

I want the computer to talk english to me, but I want my formats to be swedish, so I've changed the settings to a mix of swedish and english.

In Ubuntu setting /etc/default/locale to the following usually gives what I like:

LANG=en_US.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
LC_MONETARY=sv_SE.UTF-8
LC_MESSAGES=en_US.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=en_US.UTF-8
LC_ALL=

The same does not seem to be the right way to do it in openSUSE.

Instead I've changed sv_SE to en_US in a couple of files in my home folder.

~/.config/plasma-locale-settings.sh
~/.config/plasma-localerc
~/.i18n
~/.profile

After first trying the set the language using gui tools: yast1 yast2

Now locale gives what I expect it, and as the pictures show most dialogs speak english, but zypper does not seem to care:

user@computer:~> locale
LANG=en_US.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
LC_MONETARY=sv_SE.UTF-8
LC_MESSAGES=en_US.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=en_US.UTF-8
LC_ALL=

user@computer:~> zypper search | head -3
Läser in förrådsdata...
Läser installerade paket...

How can I convince zypper to talk english to me?

Trying to work around the problem by using en_DK instead of a mix of en_US and sv_SE is not very successful:

setting en_DK produces this error

Even with every LC_variable set to en_US the system insists on talking swedish, so there must be something else influencing the language shown:

user@computer:~> locale | grep sv_SE 
LC_CTYPE=sv_SE.UTF-8
LC_NUMERIC=sv_SE.UTF-8
LC_TIME=sv_SE.UTF-8
LC_COLLATE=sv_SE.UTF-8
LC_MONETARY=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
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_CTYPE
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_NUMERIC
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_TIME
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_COLLATE
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_MONETARY
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_PAPER
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_NAME
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_ADDRESS
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_TELEPHONE
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref
LC_MEASUREMENT
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> NEXT=`locale | grep sv_SE | awk -F '=' '{ print $1 }' | head -1`; echo $NEXT; export $NEXT=en_US.UTF-8; zypper ref

bash: export: "=en_US.UTF-8": inte en giltig identifierare
Root-behörigheter krävs för att uppdatera systemarkiv.
user@computer:~> locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
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=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=

Resetting everything to en_US and rebooting teaches zypper english:

user@computer:~> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
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="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
user@computer:~> zypper ref
Root privileges are required for refreshing system repositories.
3
  • Have you tried to set the system language to en_DK.UTF-8 and then only set LC_MONETARY to sv_SE.UTF-8 (because en_DK.UTF-8 has kr. as monetary symbol for Danish crowns)?
    – AlexP
    Dec 15, 2016 at 19:06
  • en_DK? Never heard of. I'm not Danish, should there not be a en_SE in that case?
    – azzid
    Dec 15, 2016 at 19:16
  • I don't know why, but there is an en_DK. Most formats should be similar in Denmark and Sweden -- as far as I know (but I'm neither Danish nor Swedish). Monetary amounts use different symbols for sure, but aren't numbers, paper size etc. the same?
    – AlexP
    Dec 15, 2016 at 19:36

2 Answers 2

1

You can execute export LC_ALL=C before zypper .....

For instance:

# export LC_ALL=C
# zypper dup
Warning: You are about to do a distribution upgrade with all enabled
repositories. Make sure these repositories are compatible before you
continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...
...
...
0

After setting everything back to english I could get the desired behavior by:

Right clicking the clock - selecting Set Time Format... - Selecting Detailed Settings and activating swedish for all detailed settings:

language settings

Verifying the locale after that I think maybe LC_CTYPE might be the crook. But alot of LC_variables I had set to swedish are now english, so it would require some more tinkering to be sure.

user@computer:~> zypper ref
Root privileges are required for refreshing system repositories.
user@computer:~> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=sv_SE.UTF-8
LC_TIME=sv_SE.UTF-8
LC_COLLATE=sv_SE.UTF-8
LC_MONETARY=sv_SE.UTF-8
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="en_US.UTF-8"
LC_MEASUREMENT=sv_SE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .