Hi all,
I was just wondering how exactly the LANG environment variable works.
On my system (Linux Lite 6.2) the default is:
echo $LANG
de_DE.UTF-8
That´s o.k. so far. Now I want to get the output of a certain command in English. So I prepend the command thus
(as an example I´m using the command for a simulated installation of a package):
env LANG=en_GB:en apt-get -s install lowdown
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
lowdown
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Inst lowdown (0.10.0-1 Ubuntu:22.04/jammy [amd64])
Conf lowdown (0.10.0-1 Ubuntu:22.04/jammy [amd64])
That works as desired. It´s the British variant. It also works with the American variant.
However using the command env LANG=en_US.UTF-8 apt-get -s install lowdown
, i.e. including “UTF-8”, the language setting is ignored and I still get the German output :
env LANG=en_US.UTF-8 apt-get -s install lowdown
HINWEIS: Dies ist nur eine Simulation!
apt-get benötigt root-Privilegien für die reale Ausführung.
Behalten Sie ebenfalls in Hinterkopf, dass die Sperren deaktiviert
sind, verlassen Sie sich also bezĂĽglich des reellen aktuellen
Status der Sperre nicht darauf!
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden NEUEN Pakete werden installiert:
lowdown
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
Inst lowdown (0.10.0-1 Ubuntu:22.04/jammy [amd64])
Conf lowdown (0.10.0-1 Ubuntu:22.04/jammy [amd64])
Does anyone know why that is
Many thanks in advance and many greetings from Rosika.