mod_lang
Internalization and Localization
The mod_lang module is ProFTPD's module for handling the LANG
and OPTS UTF8 commands, in support of RFC 2640. The mod_lang module also supports character
sets other than UTF8, for those sites which do no require RFC2640 support, but
do use character sets other than ASCII. This module is contained in the
mod_lang.c file for ProFTPD 1.3.x, and is compiled in
whenever the --enable-nls configure option is used. Installation
instructions are discussed here.
The most current version of mod_lang can be found in the
ProFTPD source distribution:
http://www.proftpd.org/
<VirtualHost>, <Global>
The LangDefault directive is used to specify the default
language of specific server configuration. Note that the specified language
must be listed in the output from:
$ locale -a
Example:
<IfModule mod_lang.c>
# Set the default to be Italian
LangDefault it_IT
</IfModule>
<VirtualHost>, <Global>
The LangEngine directive enables or disables the module's
handling of the LANG command. If it is set to off this module does no
localization of responses.
Note that setting LangEngine to off also keeps
proftpd from advertisting "UTF8" in its FEAT response.
As required by RFC 2640, proftpd can only show "UTF8"
in response to a FEAT command if the LANG command
is also supported. Hence why it is the LangEngine directive,
and not UseUTF8, which controls the appearance of "UTF8".
The LangPath directive is used to configure an alternative
directory from which mod_lang will load locale files. By
default, mod_lang uses $prefix/locale/,
where $prefix is where you installed proftpd,
e.g. /usr/local/.
The path parameter must be an absolute path.
Example:
LangPath /etc/proftpd/locale
Example:
LangPath /path/to/ftpd/locale
<VirtualHost>, <Global>
The UseEncoding directive is used to explicit configure which
character sets should be used for encoding. By default, the
mod_lang will automatically discover the local character set,
and will use UTF8 for the client character set. The module will also allow
the use of UTF8 encoding to be changed by clients using the OPTS UTF8 command
(as per RFC2640). However, if the UseEncoding directive is
explicitly used to indicate the character sets to use (or not use), then any
OPTS UTF8 commands used by clients will be refused.
For example, to disable all use of encoding, use the following in your
proftpd.conf:
UseEncoding offSimilarly, to enable use of UTF8 encoding and to not allow clients to change the use of UTF8, you would use:
UseEncoding on
In addition to the on|off parameters, the UseEncoding
directive allows administrators to specify exactly which character sets
to use locally (i.e. for paths on local disks) and for dealing with
clients. One such usage this way might look like:
UseEncoding koi8-r cp1251For a full list of the character sets which are supported, use:
$ iconv --list
mod_lang module is distributed with ProFTPD. To enable use
of NLS (Natural Language Support) in your proftpd daemon, use the
--enable-nls configure option:
./configure --enable-nls make make installThis option causes
mod_lang to be compiled into
proftpd.