The shell starts to speak German

In the last time it seems as if the shell (the console window) has started a language training in German. The result is ridiculous, since it starts speaking English, after a few lines it gives the results in German language and sometimes even in Spanish. I did not configure anything requesting German or Spanish dialogue using the shell. Moreover this can break a lot of scripts which rely upon answers of the shell. How can I fix this problem ?
Thank you very much for any help on this,
BTW I have also other linuxes such as kubuntu, the same chaos of languages also there.

… Example
(I always have “Pulp Fiction” in mind when I say this phrase)
but an example of what you are doing and seeing as a result would be a start …

1 Like

2023-11-22_00-11
here it is. first the shell speaks English, than German. “Kommando nicht gefunden”

… leider ein Foto - ich tippe mal was da steht:

bash: apt: Kommando nicht gefunden

In Manjaro KDE/Plasma ist Bash nicht der Standard.
Das ist aber die shell, die Dir diese Antwort gibt.

Womöglich hast Du irgendwelche Änderungen an Teilen der Lokalisationsoptionen vorgenommen.
Um in KDE/Plasma Bash als Shell zu haben, muĂź man was tun - ansonsten ist zsh die shell
soweit ich weiĂź

Ich bin aber hier ohne weitere Info am Ende meines Lateins angekommen …


… a screenshot, unfortunately - I’ll type what it says there:

bash: apt: Kommando nicht gefunden.

In KDE/Plasma 8Manjaro, Bash is not the standard or the default.
But bash is the shell that is giving you these responses.

Perhaps you changed some parts of the localization options?
To have bash as the shell in KDE/Plasma, one needs to actively change things.

Else: zsh is the default.

as far as I know

But without further info I have arrived at my whits end for now.

You are not on ubuntu :wink:

so apt is wrong .

1 Like

The thing is that it is answering in german, not that he tries to use apt (that is also wrong, but I imagine that he already knows that)

What is the value of the LANG environment variable?

echo $LANG

Also check the content of /etc/locale.conf

cat /etc/locale.conf
2 Likes

That is bad coding if the script relies on textual output in a specific language.

So what language do you expect?

Which language did you configure?

Provide the output from the following commands

cat /etc/locale.conf
localectl --status

Do not post screenshot or photo - but the text - inside a code fence.

codefence example

```
 $ cat /etc/locale.conf
LANG=en_DK.UTF-8
LC_ADDRESS=da_DK.UTF-8
LC_IDENTIFICATION=da_DK.UTF-8
LC_MEASUREMENT=da_DK.UTF-8
LC_MONETARY=da_DK.UTF-8
LC_NAME=da_DK.UTF-8
LC_NUMERIC=da_DK.UTF-8
LC_PAPER=da_DK.UTF-8
LC_TELEPHONE=da_DK.UTF-8
LC_TIME=da_DK.UTF-8
```

In addition to these settings there is also a LANGUAGE which is - usually - not set but may be set with a list of fallback language(s) to use if a specific text is not available using the primary LANG.

See the all-knowing Locale - ArchWiki for more in depth information about locale

1 Like

no !

  • The first messages are from ssh (in english)
  • The last message is from bash (in german)
1 Like

Thank you very much for your help on this. Here the output of the language configuration. My concern is that when I installed the system everything went as I expected. After I configured three additional keyboards German, Russian and Italian, since I have to write sometimes in other languages than English. It worked still fine. At a certain point of time the bash started to translate, OK I understand the output, but I would like a consistent behavior.
Yes I know that the bash gives return values you can use for examine if your commands have been executed correctly or not. But, in certain situations an additional “understanding” of the reply is fine. I am doing research on linguistics and automatic understanding of language. For this reason I am playing around with output targeted for humans.
Here the output of the language environment. I see that one is UK English, one US English. Maybe that the automatic translation tries to translate from UK to US ? I want to turn off this translation.
Thx a lot for your help

[admin@HP01 ~]$ cat /etc/locale.conf 
LANG=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_TIME=en_US.UTF-8
[admin@HP01 ~]$ echo $LANG
en_GB.UTF-8
[admin@HP01 ~]$

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

This is odd

Did you edit ~/.zshrc or ~/.bashrc at any time ?

Even odder when taking into account that the error message came in german! :face_with_spiral_eyes:

1 Like

No, did not change neither of the files. I configured the Konsole in order to use bash. But now I noticed that there is a language setting which can be activated clicking on the three lines in the right upper corner. On Settings another toolbar gets opened and there is “language”. clicking on language the attached window gets opened. I do not have any idea where the fallback languages come from. Now I reboot the PC and have a look what happens.

No change in the behavior of the konsole. I deleted all fallback languages. The console continues to speak German.

I don’t have any solution for you, but that’s actually quite interesting…

My Konsole Configure Language window displays primary language as Afrikaans, but all CLI messages are in English.

Try setting LC_MESSAGES in your /etc/locale.conf to English.

The LC_MESSAGES category of a locale definition source file defines the format for affirmative and negative system responses.
https://www.ibm.com/docs/en/aix/7.2?topic=ff-lc-messages-category-locale-definition-source-file-format

https://man.archlinux.org/man/locale.5

Edit
You can also define LANGUAGE or even stronger, LC_ALL witch will then override all other settings.

My theory is that a LC_ALL or simular is set when you connect with ssh, then does not get overwritten when you “return” and stays in German.

Don’t worry

:smile:

It is a drop down select list - it only takes effect if you actually click on Add Fallback Language.

That’s a relief. I was worried because I couldn’t find Strine.

1 Like

Off-topic trivia:

A friend of mine always refers to Afrikaans as Baby Dutch;
yes, she is Dutch. :wink:

I tried out the variable LC_MESSAGES set to English, same as before. Then I set in the /etc/locale.con LC_ALL to English. However doing echo $LC_ALL is not set. Setting it by hand with export LC_ALL I can set this variable. but an ls -la shows still in German:

insgesamt 91736
drwx------ 27 admin admin     4096  7. Dec 23:33 .
drwxr-xr-x  8 root  root      4096  5. Nov 15:40 ..
drwxr-xr-x  2 admin admin     4096  1. Dec 01:08 Backup
-rw-------  1 admin admin    16936  7. Dec 23:28 .bash_history
-rw-r--r--  1 admin admin       21  3. Sep 19:22 .bash_logout
-rw-r--r--  1 admin admin       57  3. Sep 19:22 .bash_profile
-rw-r--r--  1 admin admin     3824  3. Sep 19:22 .bashrc