Differences between revisions 23 and 76 (spanning 53 versions)
Revision 23 as of 2004-05-04 11:44:23
Size: 1838
Editor: anonymous
Comment:
Revision 76 as of 2022-08-04 21:37:14
Size: 6933
Editor: PaulWise
Comment: minor cleanup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## Auto-converted by kwiki2moinmoin v2005-10-07
== Translations ==
*LocaleSpanish -- en español
#language en
##For Translators - to have a constantly up to date translation header in you page, you can just add a line like the following (with the comment's character at the start of the line removed)
## <<Include(Locale, ,from="^##TAG:TRANSLATION-HEADER-START",to="^##TAG:TRANSLATION-HEADER-END")>>
##TAG:TRANSLATION-HEADER-START
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[Locale|English]] - [[es/Locale|Español]] - [[it/Locale|Italiano]] - [[pt_BR/Locale|Português (Brasil)]] - [[uk/Locale|Українська]]-~
##TAG:TRANSLATION-HEADER-END
Line 5: Line 8:
This page indicates how to install / use Debian in your local language. This page indicates how to install/use Debian in your local language.
Line 7: Line 10:
See :

 * ["ManPage"]
 * http://www.ping.be/linux/locales/index.shtml
 * http://packages.debian.org/stable/utils/util-linux-locales
 * http://mobile.linux.com/howtos/Secure-Programs-HOWTO/locale.shtml
 * http://am.xs4all.nl/phpwiki/index.php/LanguageSupport
<<TableOfContents()>>
Line 16: Line 13:
=== Text way ===
 * 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.:
Line 19: Line 14:
   * de_DE ISO-8859-1
   * de_DE@euro ISO-8859-15
Programs that support local technology use environment variables to determine the conventions to use for date and time formatting, character display, currency display and codepage selection.
Line 22: Line 16:
You can see the supported locales typing nano /usr/share/i18n/SUPPORTED The following environment variables affect locale related behaviour of the system:
Line 24: Line 18:
 * Run the command "locale-gen"
 * Add the default language to the file /etc/profile (one of the entries you generated in /etc/locale.gen):
   * export LANG=de_DE
   * export LC_ALL=de_DE
   * export LC_CTYPE=de_DE
 * To use the new settings with all programs, not only the ones already running, reboot. That's it.
||LANG ||Determines the default locale in the absence of other locale related environment variables||
||[[https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/The-LANGUAGE-variable.html|LANGUAGE]] ||List of fallback message translation languages (GNU only)||
||LC_ADDRESS ||Convention used for formatting of street or postal addresses||
||LC_ALL ||Overrides all other locale variables (except LANGUAGE)||
||LC_COLLATE ||Collation order||
||LC_CTYPE ||Character classification and case conversion||
||LC_MONETARY ||Monetary formatting||
||LC_MEASUREMENT ||Default measurement system used within the region||
||LC_MESSAGES ||Format of interactive words and responses||
||LC_NUMERIC ||Numeric formatting||
||LC_PAPER ||Default paper size for region||
||LC_RESPONSE ||Determines how responses (such as Yes and No) appear in the local language||
||LC_TELEPHONE ||Conventions used for representation of telephone numbers||
||LC_TIME ||Date and time formats||
Line 31: Line 33:
=== Cursor way ===
Get root and type dpkg-reconfigure locales and select your locale .
== Zones, languages and countries ==
 * euro : http://www.debian.org/doc/manuals/debian-euro-support/debian-euro-support.txt
 * user-de package for German users : http://www.it-cockpit.de/index.php?page=/howto/locale.php?ref=http://search.yahoo.com/search?p=debian+locale&ei=UTF-8&fr=fp-pull-web-t&n=20&fl=0&x=wrt
 * Spanish :
   * Speakers : http://packages.debian.org/unstable/misc/user-es.html
   * Spaniards : http://packages.debian.org/unstable/misc/user-euro-es.html
http://www.realidadfutura.com/docu/debian/Castellanizar.html
 * Japanese:
   * http://packages.debian.org/unstable/misc/user-ja.html
   * http://penguinppc.org/~hollis/linux/nihongo.shtml
 * [["Esperantigi"]]
You can set `LANG` or `LC_ALL` to your preferred locale.

If there are specific aspects of your primary locale that you don't like (e.g., date formats), then you can leave `LC_ALL` unset, set `LANG` to a default locale, and set specific variables to override those features only. If you do this, you should override features in a compatible way. For example, if you do not set `LC_ALL` and set `LANG=en_US.UTF-8`, then you should not also set `LC_TIME=ja_JP.eucjp` because the codepages of the `LANG` and `LC_TIME` settings would clash.

=== 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. If you have DebPkg:tcsh or csh users, create a file named `/etc/csh/login.d/lang` with the following content:
 {{{
 if (! $?LANG) setenv LANG de_DE.iso88591
 }}}
 This will only set `LANG` if it was not previously defined, for example by ssh. Unfortunately, this won't affect users who login with xdm, gdm, etc.

=== SSH ===

==== SSH Server ====

If you've upgraded from a very old version of Debian (before [[DebianEtch|Etch]]), your [[DebianMan:5/sshd_config|sshd_config(5)]] may not contain the correct {{{AcceptEnv}}} directive to let the ssh client pass locale variables. Edit your {{{/etc/ssh/sshd_config}}} file and make sure it contains this line:

{{{
AcceptEnv LANG LC_*
}}}

Then restart the `ssh` service to make it take effect. Also, you should log out of your current ssh connection and log back in. Already-running programs will not be affected.

==== SSH Client ====

If you've upgraded from a very old version of Debian (before [[DebianEtch|Etch]]), your [[DebianMan:5/ssh_config|ssh_config(5)]] may not contain the correct {{{SendEnv}}} directive to let the ssh client pass locale variables. Edit your {{{/etc/ssh/ssh_config}}} file and make sure it contains this line:

{{{
SendEnv LANG LC_*
}}}

You should log out current ssh connection and log back in. Already-running session will not be affected.

=== GDM ===

In GDM login screen, pick a proper locale from the list of installed locales by clicking the locale button in the bottom of the screen.

Alternatively, edit {{{~/.dmrc}}}. For example, to set the user-wide locale to {{{en_DK.utf8}}}, {{{~/.dmrc}}} could be something like this:

{{{
[Desktop]
Session=gnome
Language=en_DK.utf8
Layout=fi
}}}

=== Manually ===

 * Edit the file `/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
}}}
 The supported locales are listed in {{{/usr/share/i18n/SUPPORTED}}}.
 * Run the command `locale-gen`
 * Run the command `locale -a` to verify the list of available locales; note that the spellings change.
 * 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.

=== First day of week ===

You might want to use the default en_US locale because some software doesn't play nice when locale's set to something else, but you want to have the first day of the week set to Monday, not to Sunday, like it's defined in en_US. To get this desired behaviour you can add the following to `/etc/default/locale`:

{{{
LC_TIME="en_GB.UTF-8"
}}}

=== Measuring units and paper size ===

You might also want to change the measuring units and the paper size if you're from Europe:

{{{
LC_PAPER="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
}}}

== Keyboard layout ==

See: [[https://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_the_keyboard_input|debian-reference]].

== See Also ==

 * ReduceDebian - Reducing the number of installed locales

----
CategorySystemAdministration CategoryLocalization

Translation(s): English - Español - Italiano - Português (Brasil) - Українська


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

Configuration

Programs that support local technology use environment variables to determine the conventions to use for date and time formatting, character display, currency display and codepage selection.

The following environment variables affect locale related behaviour of the system:

LANG

Determines the default locale in the absence of other locale related environment variables

LANGUAGE

List of fallback message translation languages (GNU only)

LC_ADDRESS

Convention used for formatting of street or postal addresses

LC_ALL

Overrides all other locale variables (except LANGUAGE)

LC_COLLATE

Collation order

LC_CTYPE

Character classification and case conversion

LC_MONETARY

Monetary formatting

LC_MEASUREMENT

Default measurement system used within the region

LC_MESSAGES

Format of interactive words and responses

LC_NUMERIC

Numeric formatting

LC_PAPER

Default paper size for region

LC_RESPONSE

Determines how responses (such as Yes and No) appear in the local language

LC_TELEPHONE

Conventions used for representation of telephone numbers

LC_TIME

Date and time formats

You can set LANG or LC_ALL to your preferred locale.

If there are specific aspects of your primary locale that you don't like (e.g., date formats), then you can leave LC_ALL unset, set LANG to a default locale, and set specific variables to override those features only. If you do this, you should override features in a compatible way. For example, if you do not set LC_ALL and set LANG=en_US.UTF-8, then you should not also set LC_TIME=ja_JP.eucjp because the codepages of the LANG and LC_TIME settings would clash.

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. If you have tcsh or csh users, create a file named /etc/csh/login.d/lang with the following content:

     if (! $?LANG) setenv LANG de_DE.iso88591

    This will only set LANG if it was not previously defined, for example by ssh. Unfortunately, this won't affect users who login with xdm, gdm, etc.

SSH

SSH Server

If you've upgraded from a very old version of Debian (before Etch), your sshd_config(5) may not contain the correct AcceptEnv directive to let the ssh client pass locale variables. Edit your /etc/ssh/sshd_config file and make sure it contains this line:

AcceptEnv LANG LC_*

Then restart the ssh service to make it take effect. Also, you should log out of your current ssh connection and log back in. Already-running programs will not be affected.

SSH Client

If you've upgraded from a very old version of Debian (before Etch), your ssh_config(5) may not contain the correct SendEnv directive to let the ssh client pass locale variables. Edit your /etc/ssh/ssh_config file and make sure it contains this line:

SendEnv LANG LC_*

You should log out current ssh connection and log back in. Already-running session will not be affected.

GDM

In GDM login screen, pick a proper locale from the list of installed locales by clicking the locale button in the bottom of the screen.

Alternatively, edit ~/.dmrc. For example, to set the user-wide locale to en_DK.utf8, ~/.dmrc could be something like this:

[Desktop]
Session=gnome
Language=en_DK.utf8
Layout=fi

Manually

  • Edit the file /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

    The supported locales are listed in /usr/share/i18n/SUPPORTED.

  • Run the command locale-gen

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

  • 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.

First day of week

You might want to use the default en_US locale because some software doesn't play nice when locale's set to something else, but you want to have the first day of the week set to Monday, not to Sunday, like it's defined in en_US. To get this desired behaviour you can add the following to /etc/default/locale:

LC_TIME="en_GB.UTF-8"

Measuring units and paper size

You might also want to change the measuring units and the paper size if you're from Europe:

LC_PAPER="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"

Keyboard layout

See: debian-reference.

See Also


CategorySystemAdministration CategoryLocalization