About the LINGUAS environment variable

Alexander E. Patrakov patrakov at ums.usu.ru
Wed Jun 22 08:24:51 PDT 2005

I propose to add the following text (possibly with some edits) somewhere 
before Chapter 5 after LFS 6.1 goes out.

Many packages provide the --disable-nls option to their configure 
scripts, and give the following help text for it: "do not use Native 
Language Support". Native Language Support means not only translated 
messages, but also correct classification of characters, case mapping, 
sorting order, etc. Programs compiled with this switch disregard the 
LANG environment variable completely at runtime and either think that 
all non-ASCII characters (i.e. accented or national characters) are
non-printable or use hard-coded defaults instead of functions provided
by glibc in order to classify and sort them. The behaviour of 
disregarding LANG is not standards-compliant, therefore, it is 
recommended that you don't use this switch except when it is explicitly 
mentioned in this book.

A way to save space on unneeded message translations without any
negative effects upon other NLS aspects is to set the LINGUAS variable
during the build. The contents of this variable should be a
space-separated list of two-letter codes of languages, translations to
which should be installed. E.g., to install only Italian and Spanish

export LINGUAS="it es"

Programs compiled in such a way are fully usable in other locales, and
work correctly with user documents written in other languages. Just
messages from a program itself will be in English.

To install no translations, set LINGUAS to the empty value:

export LINGUAS=

If the LINGUAS variable isn't exported, all available translations are 

Alexander E. Patrakov

More information about the lfs-dev mailing list