Mythweb translation guidelines:

For everyone:

    I've written a routine that scans mythweb's files looking for translation
    strings.  Because of this, you must be very careful what interpreted
    characters you put inside of translation strings.  The easiest way to avoid
    confusion is to use non-interpreting single quotes ('') instead of double
    quotes (""), and do not put things like newlines (\n), tabs (\t) etc. into
    any of your translated strings (they're invisible to html, anyway).

For translators:

    To create new translation files, just copy any existing file (probably
    English.php since it will have the least amount of information to delete)
    and fill it in with the appropriate translations.  Mythweb now uses a
    php-based translation hash, so you will see a line defining the $L array,
    followed by lines like the following:

        'some string in English' => 'some string in another language',

    If set to a null string ('') the original English will be used.  If set to
    the value null, or not defined, users will see an error in the html code
    telling them that there is an untranslated string.  See below for info about
    untranslated strings.

    Please look at English.php for examples.  Some of the translation strings
    are shorthand, and are even "translated" in English.php into more verbose
    sentences.

    Don't forget to add your language to the $Languages array in
    includes/translate.php, too.  That way, it will attempt to auto-detect the
    browser's preferred language, and show up in the mythweb settings language
    choice menu.

For theme developers and coders:

    Mythweb now has two translation functions:  t() and tn().

    t() is a simple string translation.  For input, it takes the string to be
    translated, along with an optional number of additional parameters that will
    be inserted into the string's specified variables ($1, $2, etc.).  See below
    for details about variables.

    tn() is used to deal with plurality in translation, similar to ngettext().
    For parameters, it takes a series of strings, followed by an integer and an
    optional array of parameters (not a list like t()).  eg:

        tn('$1 hour', '$1 hours', $hours, array($hours));

    if $hours is 1, tn() would translate and return '$1 hour', but for 2 or
    more, would return '$1 hours'.  Any number of strings can be used (in case
    there are languages that might need strings for 1, 2 and 3-or-more, etc.).

Variables in strings:

    Some translation strings will contain variables like $1, $2, etc.  In the
    code, certain values will be substituted in for those variables.  The
    variables allow translators to rearrange sentences as they see fit, without
    having to worry about grammatical differences between languages.

    Thus, you might see a string like 'You have $1 recordings' translated as
    'You have 5 recordings'.  Strings with multiple variables can have them
    rearranged if they would make better sense for your language if they were in
    a different order.

Untranslated strings:

    As I mentioned above, there is a script (build_translation.pl) included in
    the languages subdirectory that is designed to keep translations up to date.
    Running this script will scan all of Mythweb's data files, along with the
    Default theme (I haven't yet decided if I should scan other themes), and
    update language files, filling in any undefined strings with '' translations
    (which will result in English being shown to users until a translation is
    added).
