3

I've got Ubuntu installed with Dutch as my language. I often work in the terminal and many of the outputs are in Dutch as well. This is very inconvenient though, because I often need to search for error messages I get, and on the interwebs error messages are unfortunately easier found in English than in Dutch.

Is there a way to have all terminal output in English, while all GUI's are in Dutch?

All tips are welcome!

kramer65
  • 2,123
  • 7
  • 30
  • 50
  • 2
    You can get English command output by simply prefixing the command with `LANG=C`, e.g. `LANG=C sudo apt update`. You can also type `LANG=C` on its own and it will last until you close that terminal window. – Byte Commander Feb 04 '18 at 21:58
  • 1
    To set `LANG=C` automatically for every new terminal session just add the command to your `~/.bashrc`. – dessert Feb 04 '18 at 22:09
  • 1
    @ByteCommander: The duplicate question focuses on changing it temporarily, while my interpretation of the OP's desire is a permanent change. If there is no more suitable duplicate question, I think this one shouldn't be closed. – Gunnar Hjalmarsson Feb 04 '18 at 22:41

1 Answers1

5

To change it persistently, so you always have English when opening a terminal window, open the ~/.bashrc file for editing and add these lines:

export LANGUAGE=en_US
export LANG=en_US.UTF-8
Gunnar Hjalmarsson
  • 32,938
  • 3
  • 63
  • 94
  • Why `en_US` and not `C` as suggested by commenters? – Melebius Feb 05 '18 at 06:56
  • 2
    @Melebius: Setting `LANG=C` disables UTF-8 encoding, and I'm not sure that's generally a good idea. Besides, this approach applies also if you want to enable some other language but English for the terminal. – Gunnar Hjalmarsson Feb 05 '18 at 10:27
  • What is the difference between `LANG` and `LANGUAGE`? Why does one need or want to set both? – dessert Feb 06 '18 at 13:08
  • 1
    @dessert: https://askubuntu.com/questions/311767/why-is-overriding-the-lang-environment-variable-not-changing-the-language-for-me `LANGUAGE` is set more often than not in Ubuntu. `LANG=C` is special; if you do that, you automatically disable `LANGUAGE`. – Gunnar Hjalmarsson Feb 06 '18 at 13:46