Anope Multi Language Support
----------------------------

1) Building Anope with gettext support
2) Adding a new language
3) Using languages with modules
4) Updating a language file

1) Building Anope with gettext support

    To build Anope with gettext support, gettext and its development libraries must be installed on the system.

    On Debian install the locales-all package.

    On Ubuntu run locale-gen for each language you want to enable.
        For example:
        locale-gen es_ES.UTF-8

        Then execute:
        dpkg-reconfigure locales

    If you have already built Anope you will need to delete the build directory and rebuild from scratch.

    Building Anope on Windows with gettext support is explained in docs/WIN32.txt

2) Adding a new language

    Anope uses gettext (https://www.gnu.org/software/gettext/) to translate messages for users. To add a new language
    install gettext and run `msginit -l language -o anope.language.po -i anope.pot`. For example if I was translating to
    Spanish I could run `msginit -l es_ES -o anope.es_ES.po -i anope.pot`. Open the newly generating .po file and start
    translating. Once you are done simply rerun ./Config; make && make install and add the language to your services.conf.
    Note that on Windows it is not quite this simple, windows.cpp must be edited and Anope recompiled and restarted.

    Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
    po files (especially on Windows).

    If you have finished a language file translation and you want others to use it, please file a pull request on GitHub
    or send it to team@anope.org (don't forget to mention clearly your (nick)name, your email and the language name).
    You'll of course get full credit for it.

3) Using languages with modules

    Module authors can easily add the ability to have their modules translated by adding _() around the strings they
    want translated (messages to the user, etc).

    If you want to translate a module someone has made, first generate a .pot file if there isn't one already using
    `xgettext -s -d modulename -o modulename.pot --from-code=utf-8 --keyword --keyword=_ modulename.cpp`.
    The .pot file is a template of all of the language strings extracted from the source file.

    Next, run msginit on the .pot file with
    `msginit -l language -o modulename.language.po -i modulename.pot`.
    Translate the new .po file and rerun ./Config; make && make install.

    All .po and .pot files should be placed in modules/third/language. Additionally an update script is provided there
    that will create .pot files and merge any changes to it with existing .po files.

4) Updating a language file

    Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
    po files (especially on Windows).

    Before editing the relevant file in languages/, run `update.sh` in the languages/ folder, i.e. `cd` to it and run
        ./update.sh
    This will update the language file to contain all strings that need a translation.

    Then commit only the changed .po files in git.
