This document explains how to create an rcalc translation file, which
will allow you and others to use rcalc in your native language.

Open the file po/rcalc.pot in any text editor and save it as a plain
text file to COUNTRYCODE.po, where COUNTRYCODE is two or more letters
which denote the language and country for the translation. Most codes
are two letters, for example `it' for Italy, `de' for Germany (Deutchland)
`es' for Spain (Espaol) and `fr' for France, but others can be longer
for example `fr_BE', which is for people in Belgium who speak French,
and `en_GB', which is British English.

The top of the file will look something like this:

    # SOME DESCRIPTIVE TITLE.
    # Copyright (C) YEAR Free Software Foundation, Inc.
    # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
    #
    "Project-Id-Version: PACKAGE VERSION\n"
    "POT-Creation-Date: 2001-03-22 13:00+0000\n"
    "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    "Language-Team: LANGUAGE <LL@li.org>\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=CHARSET\n"
    "Content-Transfer-Encoding: ENCODING\n"

You need to update this with the current information. In the file
`de.po', for example, we have this:

    # German translations for rcalc.
    # Copyright (C) 2000 Free Software Foundation, Inc.
    # Johann Glaser <Johann.Glaser@gmx.at>, 2000
    #
    "Project-Id-Version: rcalc 0.2.3\n"
    "POT-Creation-Date: 2001-03-22 13:00+0000\n"
    "PO-Revision-Date: 2000-09-20 11:23+0100\n"
    "Last-Translator: Johann Glaser <Johann.Glaser@gmx.at>\n"
    "Language-Team: \n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=iso-8859-1\n"
    "Content-Transfer-Encoding: 8bit\n"

The rest of the file contains pairs of lines entitled msgid and
msgstr, for example:

    #. Engine | Commands | Can't allocate any memory
    #: src/librcalc/command.c:347
    msgid "not enough memory."
    msgstr ""

    #. Help | Error message for man and help
    #: src/librcalc/command.c:122
    #, c-format
    msgid "no help page available for `%s'."
    msgstr ""

In the file de.po, after translation, these two entries look like this:

    #. Engine | Commands | Can't allocate any memory
    #: src/librcalc/command.c:347
    msgid "not enough memory."
    msgstr "Nicht genug Speicher."

    #. Help | Error message for man and help
    #: src/librcalc/command.c:122
    #, c-format
    msgid "no help page available for `%s'."
    msgstr "Keine Hilfe zu `%s' verfgbar."

Pay particular attention to things like %d and %s - these will be
substituted for numbers and strings and it is vital that the
translated string contains exactly the same number of these tokens and
that they are in exactly the same order.

To test the strings you have created you will have to compile and
install your translated file. Edit the file configure.in and add
your country code to the ALL_LINGUAS variable. Now rerun `make' and
`make install' to build and install your file. Then run rcalc; if you
don't see your messages then you may have to set an environment
variable to make this happen: to make it use French, for example, with
bash, you would enter:

    export LANG=fr_FR

Alternatively, if you are using tcsh you would have to enter:

    setenv LANG fr_FR

Once you have a working po file, then compress it by entering:

    gzip -9 de.po

And then email the file de.po.gz to rcalc@inauspicious.org. Of course,
you should replace de.po and de.po.gz with your filenames.


If you want to translate the online help as well, please be aware that the
it is scheduled to be rewritten substantially in the near future and
you'll probably have to do the whole thing again. If this doesn't put you
off then grab the file doc/C/index.html, translate it, and email it to
rcalc@inauspicious.org.
