English output in CLI

While I like to learn different languages I find it sometimes hard to follow the outputs that people post to get help with a problem

Lots of “Hola Amigos” “Guten Tag und auf Wienerschnitzel” "Mesdames et Messieurs " and “#¤!+” .

It makes it harder to help, and since I did not find anything on it I thought a one line tutorial is in order.

Prefix your command with:

LC_ALL=C

Example:
You need help and want to post the output of sudo pacman -Syu:

LC_ALL=C sudo pacman -Syu

This will make the output in english:

~/ LC_ALL=C sudo pacman -Syu
:: Synchronizing package databases…
core is up to date 0.0 B 0.00B/s 00:00 [c o o o o o o o o ] 0%
extra is up to date 0.0 B 0.00B/s 00:00 [c o o o o o o o o ] 0%
community is up to date 0.0 B 0.00B/s 00:00 [c o o o o o o o o ] 0%
multilib is up to date 0.0 B 0.00B/s 00:00 [c o o o o o o o o ] 0%
:: Starting full system upgrade…
warning: dkms: local (2.2.0.3+git151023-5) is newer than extra (2.2.0.3-16)
warning: ufw-extras: local (0.3.0.g2d8cf5b-1) is newer than community (0.3-1)
there is nothing to do

That may be easier to understand than:

~/ sudo pacman -Syu
:: Synkroniserer pakkedatabaser…
core er oppdatert 0,0 B 0,00B/s 00:00 [c o o o o o o o o o o o o o o o o o o o o o o ] 0%
extra er oppdatert 0,0 B 0,00B/s 00:00 [c o o o o o o o o o o o o o o o o o o o o o o ] 0%
community er oppdatert 0,0 B 0,00B/s 00:00 [c o o o o o o o o o o o o o o o o o o o o o o ] 0%
multilib er oppdatert 0,0 B 0,00B/s 00:00 [c o o o o o o o o o o o o o o o o o o o o o o ] 0%
:: Starter full systemoppgradering…
advarsel: dkms: lokal (2.2.0.3+git151023-5) er nyere enn extra (2.2.0.3-16)
advarsel: ufw-extras: lokal (0.3.0.g2d8cf5b-1) er nyere enn community (0.3-1)
det er ingenting igjen å gjøre

If you need to post an image of a program then you can start it from your terminal and put LC_ALL=C in front of the command - Like this:

LC_ALL=C octopi

This will start Octopi with english output.

LC_ALL=C pamac-manager

will start Pamac with english output.

If this will mess up your your locale settings?

No - it won’t - so just start using it!

It is as easy as that!

8 Likes

Nice one. So what does the =C stand for, since it turns it into english? Central?

C Defaults to english.

Since english it the one language we all have on our boxes it is a default and the only one that will work all over.

Since I don’t have spanish installed LC_ALL=es_ES will not work here so that too will become the default english.

I am not sure what it precisely stands for but I’ll take Central :slight_smile:

LC_ALL is the environment variable that overrides the other localisation settings

Ah, so the C is actually just something that is not a locale option, so it will default to english.

Just tested with LC_ALL=B and it also defaults back to english. :slight_smile:

Nice find indeed.

I think Cancel your locale settings for this command, sounds good.

And you can always use
LANG=en_US.UTF-8 some-command

1 Like

Forum kindly sponsored by