.TH "UPDATE-LOCALE-CONFIG" "8" "2004-10-20" "update-locale-config" "Debian GNU/Linux User's Manual" .SH "NAME" update\-locale\-config \- Update differnt programs' language settings .SH "SYNOPSIS" .B update\-locale\-config [\fI\--preinst|-p\fR] [\fI\--list|-l\fR] .\"[\fI\--verbose|-v\fR] \<\fIlanguage\fR\> .\" ******************************************************************** .SH "DESCRIPTION" .B update\-locale\-config is a script that automatically updates the language settings of different programs based on the language code passed as parameter. This script is run by .B base-config throughout the Debian installation process so that the user language selection is made visible to packages and thus preventing debconf interfaces from asking questions related to language settings and adjusting packages' system-wide configuration files to the user selection. .P .B update\-locale\-config can run in two modes, pre-inst or post-inst (the default). Pre-inst mode will run all scripts under /usr/lib/localization\-config with a .B preinst suffix, most of these scripts will do .B debconf preseeding and will run before packages are actually installed. The postinst mode (default) will run all scripts under the same directory with a .B postinst suffix, most of these will modify configuration files that are available once the package has been installed on the system. .P System administrators should not need to run .B update\-locale\-config by hand, although this option is available. Notice, however, that running .B update\-locale\-config in pre-inst mode will not affect the system unless the packages whose debconf configuration has changed are reconfigured (with \fBdpkg-reconfigure PACKAGE\fR). .P Users should not run .B update\-locale\-config as all the changes this script makes are systemwide. If a user wants to change \fRhis\fI locale configuration and adjust the language configuration of his own configuration files .B set-language-env (available in the \fBlanguage-env\fR package) should be used instead. .\" ******************************************************************** .SH "OPTIONS" .TP .B \-d | \-\-debug Debugging mode .TP .B \-l | \-\-list List supported locales. .TP .B \-p | \-\-preinst Run the pre-install scripts instead of the (default) postinst scripts. .TP .I language specify your favorite native language. Here are some of the supported languages: .br .B ca_ES@euro Catalan (Spain) .br .B da_DK Danish .br .B de_BE@euro German (Belgium) .br .B de_DE@euro German (Germany) .br .B el_GR.UTF-8 Greek (Greece, UTF-8 mode) .br .B es_ES@euro Spanish (Spain) .br .B es_MX Spanish (Mexico) .br .B fr_BE@euro French (Belgium) .br .B fr_FR@euro French (France) .br .B lv_LV Latvian .br .B nb_NO or no_NO (depricated) Norwegian Bokmaal .br .B nds_DE Low Saxon .br .B nl_BE@euro Dutch (Belgium) .br .B nl_NL@euro Dutch (The Netherlands) .br .B nn_NO Norwegian Nynorsk .br .B se_NO Northern Sami .\" ******************************************************************** .SH PACKAGE SCRIPTS Support for new packages is based on scripts present in /usr/lib/localization\-config. These scripts must analyse the official locale language code (\fBlanguage[_territory][.codeset][@modifier]\fR) and modify the package as appropriate. Since language modifications might vary between different package versions, the scripts in that directory should just check the package version and call scripts in per-distribution subdirectories (\fBsarge\fR, \fBwoody\fR, etc.). .P These scripts take as input the locale language code and should do whatever modifications are need in order to configure the package. Possible modifications include: .TP .I debconf-preseeding If the package asks to the user through \fBdebconf\fR settings that might depend on the language and charset, and if an accurate guess can be made based on the users locale language code then the script should preseed the debconf values so that the user will not have to answer the questions himself upon package installation. Debconf preseeding is usually done in the \fIpreinst\fR phase. .br .I configuration file modification If the package has configuration files that can be modified to adjust for the user's selection of locale language code, the script should make any reasonable changes in order to help the user configure the package. \fBConffiles\fR (see Debian policy) should be treated with extreme care (to avoid prompts of configuration file changes by dpkg when upgrading). .TP All changes done by the scripts should be idempotent. .SH LANGUAGE SUPPORT Language support is embedded in the scripts available at /usr/lib/localization\-config. These scripts hold the \fIknowledge\fR on how to transform a given language code into a package's modification. Adding support for a new language (or variant) should be done by modifying these scripts. The code presently available that provides support for some languages could be used as a basis for new language support. In many scripts, adding support for a new language is just a matter of defining it and the values that need to be changed for it in a \fBdatabase\fR of languages and changes (actually implemented in most cases as hash array in Perl) .SH "FILES" .TP .I "/usr/lib/localization\-config" Location of the scripts that adjust programs to use the user configured locale. .SH SEE ALSO .B base-config(8), .B debconf(1), .B language-env(1), .B locale(1) .P Recommended reading also includes .I Debian GNU/Linux - Install manual (available at \fBhttp://www.debian.org/releases/stable/installmanual\fR) which descirbes how language and country selection works in the debian installer and .I Introduction to i18n (available at \fBhttp://www.debian.org/doc/manuals/intro-i18n/\fr) which describes i18n (and locale) to developers. .SH BUGS Bugs regarding this software should be sent against the .B localization-config package, preferably using the .B report-bug script. .SH "AUTHOR" This software and a first version of the manpage was written by Dagfinn Ilmari Mannsaaker for the Skolelinux distribution. This manpage was later modified for the Debian GNU/Linux by Javier Fernandez-Sanguino. Minor changes by Konstantinos Margaritis