Differences between revisions 44 and 45
Revision 44 as of 2009-07-28 21:29:06
Size: 3748
Editor: OmarCampagne
Comment: Transformed link leading to empty page to regular text
Revision 45 as of 2009-10-22 20:11:34
Size: 4177
Editor: GregWooledge
Comment: Put the dpkg-reconfigure section BEFORE the manually typing locale-gen section. Various clean-up.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 6: Line 5:
See : == Configuration ==
=== Standard ===
Get root and type `dpkg-reconfigure locales` and select the locale(s) you want to generate. At the end, you'll be asked which one should be the default. If you have users who access the system through ssh, it is recommended that you choose '''None''' as your default locale.
Line 8: Line 9:
 * [[ManPage]]
 * http://www.ping.be/linux/locales/index.shtml
 * DebPkg:util-linux-locales
 * http://mobile.linux.com/howtos/Secure-Programs-HOWTO/locale.shtml
 * http://www.alextreme.org/phpwiki/index.php/locale
 * http://am.xs4all.nl/phpwiki/index.php/LanguageSupport
This changes `/etc/default/locale` and `/etc/locale.gen` (in older versions of Debian, also `/etc/environment`). If you chose a default locale other than None above, it will be in `/etc/default/locale` and will override the `LANG` variable supplied by ssh. This is highly inconvenient.
Line 15: Line 11:
== Configuration ==
=== Text way ===
If you've upgraded to Lenny from an older version of Debian and have leftover `LANG=...` content in `/etc/environment`, you should comment it out (type `editor /etc/environment` and put a `#` character in front of the line, and then save it).

Now, optionally, edit `/etc/profile` as follows:
 * Run `locale -a` to get a list of the locale names suitable for use in environment variables. Note that the spellings are different from the ones presented in the `dpkg-reconfigure` list.
 * Add a line like this to your `/etc/profile` file:
 {{{
 : ${LANG:=de_DE.iso88591}; export LANG
 }}}
 where `de_DE.iso88591` is the locale you want to use as a default.
 This will only set `LANG` if it was not previously defined, for example by ssh. Doing this in `/etc/profile` means it only works for users who run DebPkg:bash, DebPkg:ksh, sh and so on -- not DebPkg:tcsh or csh. Also, it won't affect users who login with xdm, gdm, etc.

To use the new locale settings, log out and back in. Already-running programs will not be affected.

''TODO: how to configure things properly for xdm/gdm/etc. users.''

''TODO: SendEnv in ~/.ssh/config, personal locale settings in .bash_profile or similar.''

=== Manually ===
Line 28: Line 40:
 * Optionally, add a default locale setting to the file `/etc/profile` (using one of the entries from `locale -a`):
 {{{
 : ${LANG:=de_DE.iso88591}; export LANG
 }}}
 This will only set `LANG` if it was not previously defined, for example by ssh. Doing this in `/etc/profile` means it only works for users who run DebPkg:bash, DebPkg:ksh, sh and so on -- not DebPkg:tcsh or csh. Also, it won't affect users who login with xdm, gdm, etc.
 * If you've upgraded to Lenny and you have leftover `LANG=...` content in `/etc/environment`, you should comment it out (type `nano /etc/environment` and put a `#` character in front of the line, and then save it).
 * To use the new settings with your programs, log out and back in. (Any already-running programs will not be affected.)
 * Edit `/etc/profile` as in the previous section.
 * If you've upgraded to Lenny and you have leftover `LANG=...` content in `/etc/environment`, you should comment it out.
 * To use the new settings with your programs, log out and back in.
Line 39: Line 47:

=== Cursor way ===
Get root and type {{{dpkg-reconfigure locales}}} and select your locale. If you have users who access the system through ssh, it is recommended that you choose '''None''' as your default locale in the final question.

This changes `/etc/default/locale` and `/etc/locale.gen` (in older versions of Debian, also `/etc/environment`). If you chose a default locale other than None above, it will be in `/etc/default/locale` and will override the `LANG` variable supplied by ssh.

If you've upgraded to Lenny and have leftover `LANG=...` content in `/etc/environment`, comment it out, as shown above.

Now, optionally, edit `/etc/profile` as shown in the previous section. (You don't need to do that if you chose a default locale other than None. But if you chose None, then you probably should.)
Line 55: Line 54:
It over-writes /etc/console/boottime.kmap.gz. It over-writes the `/etc/console/boottime.kmap.gz` file.
Line 77: Line 76:
==== See Also ==== == See Also ==
Line 79: Line 78:
LocalePurge - Reducing the number of installed locales  * [[ManPage]]
 * http://www.ping.be/linux/locales/index.shtml
 * DebPkg:util-linux-locales
 * http://mobile.linux.com/howtos/Secure-Programs-HOWTO/locale.shtml
 * http://www.alextreme.org/phpwiki/index.php/locale
 * http://am.xs4all.nl/phpwiki/index.php/LanguageSupport
 * LocalePurge - Reducing the number of installed locales

This page indicates how to install / use Debian in your local language.

Configuration

Standard

Get root and type dpkg-reconfigure locales and select the locale(s) you want to generate. At the end, you'll be asked which one should be the default. If you have users who access the system through ssh, it is recommended that you choose None as your default locale.

This changes /etc/default/locale and /etc/locale.gen (in older versions of Debian, also /etc/environment). If you chose a default locale other than None above, it will be in /etc/default/locale and will override the LANG variable supplied by ssh. This is highly inconvenient.

If you've upgraded to Lenny from an older version of Debian and have leftover LANG=... content in /etc/environment, you should comment it out (type editor /etc/environment and put a # character in front of the line, and then save it).

Now, optionally, edit /etc/profile as follows:

  • Run locale -a to get a list of the locale names suitable for use in environment variables. Note that the spellings are different from the ones presented in the dpkg-reconfigure list.

  • Add a line like this to your /etc/profile file:

     : ${LANG:=de_DE.iso88591}; export LANG

    where de_DE.iso88591 is the locale you want to use as a default. This will only set LANG if it was not previously defined, for example by ssh. Doing this in /etc/profile means it only works for users who run bash, ksh, sh and so on -- not tcsh or csh. Also, it won't affect users who login with xdm, gdm, etc.

To use the new locale settings, log out and back in. Already-running programs will not be affected.

TODO: how to configure things properly for xdm/gdm/etc. users.

TODO: ?SendEnv in ~/.ssh/config, personal locale settings in .bash_profile or similar.

Manually

  • Edit the file /etc/locale.gen (i.e. open a terminal as root, and type nano /etc/locale.gen ) and add your locale settings (one set per line), e.g.:

     de_DE.UTF-8 UTF-8
     de_DE ISO-8859-1
     de_DE@euro ISO-8859-15

You can see the supported locales by typing less /usr/share/i18n/SUPPORTED or in ?LocaleSupported .

  • Run the command locale-gen

  • Run the command locale -a to verify the list of available locales; note that the spellings change.

  • Edit /etc/profile as in the previous section.

  • If you've upgraded to Lenny and you have leftover LANG=... content in /etc/environment, you should comment it out.

  • To use the new settings with your programs, log out and back in.

TODO: how to configure things properly for xdm/gdm/etc. users.

TODO: ?SendEnv in ~/.ssh/config, personal locale settings in .bash_profile or similar.

Keyboard

Console

dpkg-reconfigure console-common

It over-writes the /etc/console/boottime.kmap.gz file.

XWindow

This section is way out of date. Package and file names have all changed.

dpkg-reconfigure xserver-xfree86

It changes /etc/X11/?XF86Config-4 , Section "?InputDevice"

Zones, languages and countries

See Also


CategorySystemAdministration