How can I switch the command output language from my native language to English, so I can post my Ask Ubuntu question with English command output (error messages)?
|
More information: What does "LC_ALL=C" do? If you want to revert to the native language, unset the
|
|||||||||||||||||
|
bash function for terminalHere is my bash function to switch between DE and EN locales. You may extend this code with your preferred languages.
To use this, put it in your Call it with
In general I suggest to change all 3 environment variables Adapting to your languageExtending the code to your native language is quite simple. You can find the needed values by invoking the following command
|
|||||||||||||
|
|
Open a terminal Ctrl+Alt+T and type:
or:
Now the terminal output is in english language. You can check it with It is possible to make a command to do that with a permanent
or:
Restart the Bash shell. Now you have the command Source: |
||||
|
This is configured via locale settings, which can be set via environment variable. There are four layers of variables; the first one that is set takes precedence:
The “plain” locale, with all messages untranslated, default time and number formats, ASCII as the character set, etc. is called Thus, to run a program with messages in English, run
or
To run a program with all localization turned off, run
but beware that this switches the character encoding to ASCII (so no Unicode, latin-1, etc.). See What should I set my locale to and what are the implications of doing so? for a more detailed overview of locales. |
|||||||||||||||||||||
|
|
Easiest way is to open the terminal by pressing Alt+F2 and running this command:
|
|||
|
|
|
in your
then
Check it
Why unset first?
|
|||
|
|
LANGlike this, and it might help, but we do not require copied error messages to be in English. We require what the author has written to be in English (though we usually translate it instead of closing questions). So a question written in English with Spanish terminal text is fine, while a question written in Spanish with English terminal text is not. – Eliah Kagan Mar 5 '13 at 13:49