Change language in terminal (konsole)

Hi.

I have spanish as my main language. I’m trying to change to english in konsole to post some commands outputs but I can’t.


fernando@andromeda:~> LC_ALL=en_US.UTF-8 
fernando@andromeda:~> export LC_ALL 
fernando@andromeda:~> locale             
LANG=en_GB.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=en_US.UTF-8 


It seems it is changed but…



fernando@andromeda:~> man ls 
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this) 
 * ls (1) 
   ls (1p) 
Man: ¿Qué página de manual desea?


Some thing are in english others in spanish.
What more I need to change?

best regards

Set (or unset) LANGUAGE variable. It takes precedence for message catalogs.

Hello this is what i do if i need quickly an english output of some commands in a terminal and the rest of the system should still use my preferred language


rolf@gnomegurke:~> echo $LANG 
de_DE.UTF-8 
rolf@gnomegurke:~> man ls 
Man: alle übereinstimmenden Handbuchseiten finden (set MAN_POSIXLY_CORRECT to avoid this) 
 * ls (1) 
   ls (1p) 
Man: Welche Handbuchseiten möchten Sie haben? 
Man: ^C 
rolf@gnomegurke:~> export LANG=C 
rolf@gnomegurke:~> man ls        
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this) 
 * ls (1) 
   ls (1p) 
Man: What manual page do you want? 
Man: ^C


Try ‘LANG=C man ls’.

I tried


LANG=C
export LANG

and it didn’t work

I tried also

LANG=C  man ls

And didn’t work either

And finally I tried


LANGUAGE=en_US.UTF-8 
export LANGUAGE

and it worked

best regards

Is “LC_ALL” still set to a non-empty string?

  • If “LC_ALL” is still set to “en_US.UTF-8” –

 > LC_ALL=""
 > export LC_ALL

And then try “LANG=C man ls” again …

As you fail to show what happened this remark is rather useless.

Again we see nothing.

Our clairvoyancy is tested to the utmost. :frowning:

Don’t set LC_ALL=en_US.UTF-8. Use defaults:

[FONT=monospace]karl@erlangen:~> LANG=C locale 
LANG=C 
LC_CTYPE="C" 
LC_NUMERIC="C" 
LC_TIME="C" 
LC_COLLATE="C" 
LC_MONETARY="C" 
LC_MESSAGES="C" 
LC_PAPER="C" 
LC_NAME="C" 
LC_ADDRESS="C" 
LC_TELEPHONE="C" 
LC_MEASUREMENT="C" 
LC_IDENTIFICATION="C" 
**LC_ALL= **
karl@erlangen:~> [/FONT]

yes, that was it.


fernando@andromeda:~> LANG=C man ls 
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this) 
 * ls (1) 
   ls (1p) 
Man: ¿Qué página de manual desea? 
Man:  
fernando@andromeda:~> locale 
LANG=es_ES.utf8 
LC_CTYPE="es_ES.utf8" 
LC_NUMERIC="es_ES.utf8" 
LC_TIME="es_ES.utf8" 
LC_COLLATE="es_ES.utf8" 
LC_MONETARY="es_ES.utf8" 
LC_MESSAGES="es_ES.utf8" 
LC_PAPER="es_ES.utf8" 
LC_NAME="es_ES.utf8" 
LC_ADDRESS="es_ES.utf8" 
LC_TELEPHONE="es_ES.utf8" 
LC_MEASUREMENT="es_ES.utf8" 
LC_IDENTIFICATION="es_ES.utf8" 
LC_ALL=es_ES.utf8 
fernando@andromeda:~> LC_ALL= 
fernando@andromeda:~> export LC_ALL 
fernando@andromeda:~> LANG=C man ls 
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this) 
 * ls (1) 
   ls (1p) 
Man: What manual page do you want? 
Man: 




I guess the problem was that my .bashrc had


export LANG=es_ES.utf8 
export LC_ALL=es_ES.utf8

I have deleted the second line, I guess it will work fine from now on.

best regards

I have just see that

LC_ALL=es_ES.utf8

come by default in opensuse 15.2 when the language is spanish. In a new installed computer it is configured the same. And in the installation I set the language to english, but the keyboard to spanish, in fact yast run in english but commands run in a mixture of spanish and english

[FONT=monospace]**vm2:~ #** man ls 
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this) 
 * ls (1) 
   ls (1p) 
Man: ¿Qué página de manual desea? 
Man:

**vm2:~ #** locale 
LANG=es_ES.utf8 
LC_CTYPE="es_ES.utf8" 
LC_NUMERIC="es_ES.utf8" 
LC_TIME="es_ES.utf8" 
LC_COLLATE="es_ES.utf8" 
LC_MONETARY="es_ES.utf8" 
LC_MESSAGES="es_ES.utf8" 
LC_PAPER="es_ES.utf8" 
LC_NAME="es_ES.utf8" 
LC_ADDRESS="es_ES.utf8" 
LC_TELEPHONE="es_ES.utf8" 
LC_MEASUREMENT="es_ES.utf8" 
LC_IDENTIFICATION="es_ES.utf8" 
LC_ALL=es_ES.utf8 
**vm2:~ #**

[/FONT]

This string is not translated at all in Spanish and so is always printed in English. It is translated in some other languages.

Checking with the command “locale” in a Konsole window will prove if it’s behaving as it should do …


 > locale
 .
 .
 .
LC_ALL=
 > 

Yes, it works.
Even more, I have seen in another computer that I have defined also LC_ALL


**vm2:~ #** locale 
LANG=es_ES.utf8 
LC_CTYPE="es_ES.utf8" 
LC_NUMERIC="es_ES.utf8" 
LC_TIME="es_ES.utf8" 
LC_COLLATE="es_ES.utf8" 
LC_MONETARY="es_ES.utf8" 
LC_MESSAGES="es_ES.utf8" 
LC_PAPER="es_ES.utf8" 
LC_NAME="es_ES.utf8" 
LC_ADDRESS="es_ES.utf8" 
LC_TELEPHONE="es_ES.utf8" 
LC_MEASUREMENT="es_ES.utf8" 
LC_IDENTIFICATION="es_ES.utf8" 
LC_ALL=es_ES.utf8 
**vm2:~ #**


This computer is new installed and configured with the default language english (but keyboard spanish) during installation, so I don’t know why the locales are set this way.
Root did not have any .basrc, so I added one

**vm2:~ #** cat .bashrc 

export LC_ALL="" 
**vm2:~ #** 

And now

**vm2:~ #** locale 
LANG=es_ES.utf8 
LC_CTYPE=en_US.UTF-8 
LC_NUMERIC="es_ES.utf8" 
LC_TIME="es_ES.utf8" 
LC_COLLATE="es_ES.utf8" 
LC_MONETARY="es_ES.utf8" 
LC_MESSAGES="es_ES.utf8" 
LC_PAPER="es_ES.utf8" 
LC_NAME="es_ES.utf8" 
LC_ADDRESS="es_ES.utf8" 
LC_TELEPHONE="es_ES.utf8" 
LC_MEASUREMENT="es_ES.utf8" 
LC_IDENTIFICATION="es_ES.utf8" 
LC_ALL= 
**vm2:~ #** 

And all works ok.


**vm2:~ #** LANG=C virsh 
Welcome to virsh, the virtualization interactive terminal. 

Type:  'help' for help with commands 
       'quit' to quit 

virsh #


beste regards