On one of two Manjaro systems language support not working for pacman -Qi output

On both systems de_DE.UTF-8 is default.

On both en_US.UTF-8 is generated as well.

# locale-gen
Generating locales...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.

On the first computer “pacman -Qi” is flexible in language output:

# pacman -Qi |head
Name                     : a52dec
Version                  : 0.7.4-11
Beschreibung             : A free library for decoding ATSC A/52 streams
Architektur              : x86_64
URL                      : http://liba52.sourceforge.net/
Lizenzen                 : GPL2
Gruppen                  : Nichts
Stellt bereit            : Nichts
Hängt ab von             : glibc
Optionale Abhängigkeiten : Nichts
# LANG="en_US.UTF-8" LC_ALL=$LANG  pacman -Qi |head
Name            : a52dec
Version         : 0.7.4-11
Description     : A free library for decoding ATSC A/52 streams
Architecture    : x86_64
URL             : http://liba52.sourceforge.net/
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : glibc
Optional Deps   : None

On the second computer the response is always in german (de_DE.UTF-8).

What could be wrong?

(I have an awk script, which requires the english output)


Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

Hi @Acor,

I think you need this:

Edit:

Tip:

When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:

pasted text

This will just cause it to be rendered like this:

Sed
sollicitudin dolor
eget nisl elit id
condimentum
arcu erat varius
cursus sem quis eros.

Instead of like this:

Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.

Thereby increasing legibility thus making it easier for those trying to provide assistance.

1 Like

Try

LANG=C <command>

…and edit your post and put output as preformatted text (</>).

If german is the default locale then scripts will use the german translation where the translation exist which may not be everywhere.

If you have scripts which depends on the english locale for parsing you will have to either change your system default to english or force the script to use the us locale

I don’t think some is wrong as such - your profile says Plasma as desktop.

Check the content of

~/.config/plasma-localerc

It could be one is en_US.UTF-8 and the other de_DE.UTF-8

1 Like

I found the reason(s):

  1. In KDE regional settings German was set as main language and US English as second language. This caused the setting of LANGUAGE variable in ~/.config/plasma-localerc:

[Formats]
LANG=de_DE.UTF-8

[Translations]
LANGUAGE=de:en_US

  1. My awk script I usually call in a root environment (sudo -i), while /etc/sudoers allows inheritance of LANGUAGE.

SOLUTIONS:

Solutions can be to either set LANGUAGE=“en_US” for the awk script environment additionaly or to edit /etc/sudoers

Defaults env_keep -= “LANGUAGE”
Defaults env_delete += “LANGUAGE”
Defaults env_check -= “LANGUAGE”

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.