6

Under Ubuntu 8.10, bash shell, the LANG and LC_ALL variables are not set:

user@machine1:~$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

Where should I set those variables so that they point to en_US.UTF-8. Once that is done, do I need to restart anything?

quack quixote
  • 43,504
Thierry Lam
  • 4,477

3 Answers3

2

You can set it per user in ~/.bashrc:

export LANG=en_US.UTF-8

If you do not have that locale file installed, you can do it by

locale-gen en_US.UTF-8
Johan
  • 1,686
0

LANG is set in /etc/default/locale the rest of those the LC_ stuff are locale specific variables that I believe are set by the bash. They aren't set by xterm anyway. See man locale and man setlocale for more information.

Evan Carroll
  • 9,518
0

In addition to export and locale-gen; another possible way is to set it with update-locale LANG=XXX.

For en_US.UTF-8 it would be sudo update-locale LANG=en_US.UTF-8

karel
  • 13,706
ehiller
  • 334