Translations ProFTPD has support for translating the messages sent to clients in the FTP responses. To enable use of these translations in your proftpd, you must compile proftpd using the --enable-nls configure option. This causes the mod_lang module to be compiled into your proftpd.
proftpd
--enable-nls
mod_lang
ProFTPD uses the gettext code package for translation support.
gettext
Adding a New Translation To add a new language translation to proftpd, first check to see if the language in question already has a translation. ProFTPD's translations are kept, in the source distribution, under the locale/ directory, e.g.:
locale/
$ ls /path/to/proftpd-version/locale/*.po
To create a new translation, you first initialize a .po file for your translation using the template PO file (proftpd.pot):
.po
proftpd.pot
$ cd proftpd-version/locale/ $ msginit -i proftpd.pot -o lang.po -l lang
lang.po
Testing a Translation Once you think your .po file is ready, you should run some quick checks to make sure. First, compare your .po file against the template .pot file to see if you translated all of the messages in the template. This is accomplished using the msgcmp command:
.pot
msgcmp
$ cd proftpd-version/locale/ $ msgcmp lang.po proftpd.pot
Finally, compile your .po file into the machine-specific .mo file; this is what the gettext library uses in the running code:
.mo
$ msgfmt --check-format lang.po -o lang.mo
--check-format
Submitting Translations Once your .po file has been tested and looks ready, simply open a feature request at:
http://bugs.proftpd.org/
Keeping Translations Updated Note that as ProFTPD is developed, new messages may be added to the template .pot file, or existing messages may be changed slightly. It is important to keep ProFTPD's translations up-to-date. You can help by periodically checking the existing translations:
$ cd proftpd-version/locale/ $ make check