Translations

Language Files

Translations for the World Cup Predictor are available in the following languages.

Most of the languages above should already be part of the installation package.

If the language is not in the package (or is out of date), download the ZIP file and unpack the two files

  • world-cup-predictor-xx_XX.po
  • world-cup-predictor-xx_XX.mo

into the lang directory of the World Cup Predictor on your server.

Normally this is wp-content/plugins/world-cup-predictor/lang

Translators

If you wish to translate the World Cup Predictor into your language then you need to use the master translation file,

  • world-cup-predictor.pot

This file is part of the plugin packages and is located in the lang directory, or you can download the latest version here.

Translating the .POT

There are a number of tools and WordPress plugins available to translate files, however for this basic example we will use PoEdit (http://www.poedit.net). Download and install PoEdit.

PoEdit reads the .POT file and generates the two required .po and .mo files.

Start PoEdit and choose File -> Create a new catalog from .POT file…

From the Settings dialog, choose your Country and Language. Make sure you set the Plural Forms field to nplurals=2; plural=n != 1;.

PoEdit will then prompt you to save a .po file.

All the English strings will be listed and you enter the translations in the bottom window. For plural forms there should be an additional section at the bottom to enter the singular version and another for the plural.

Once you have saved, copy the .po and .mo files with the correct filenames to the plugins lang directory.

Filenames

The language file must be named in a specific way for WordPress to pick up the translations. The format should be

  • world-cup-predictor-xx_YY.po
  • world-cup-predictor-xx_YY.mo

Where xx is the lowercase language code, an underscore, and YY is the uppercase country code. This naming convention must equal the WPLANG setting in the file wp-config.php in the top level hosting directory of your blog.

For example French would be fr_FR, Brazilian Portuguese pt_BR. See http://codex.wordpress.org/Translating_WordPress for detailed information.

Verify translation

Check that the translation has worked correctly by visiting the WordPress Admin page for the plugin and the prediction form on your site.

Once you have finished and are happy with the file, please send me the .po and .mo files and I will add them to the plugin ZIP file and the list above.

Updating Translation

If a new version is released then to update your language file, use PoEdit to open your .po file, e.g. world-cup-predictor-pt_BR.po and then choose Catalog->Update from .POT file. Any new or changed strings will be highlighted.

If you would like an acknowledgement, and/or a link, then let me know

Thanks

9 Responses to Translations

  1. Pingback: World Cup Predictor V1.0 « World Cup Predictor

  2. Arnold says:

    how can i select another language then English?
    The dutch files are located in my lang directory

    greetz

    • admin says:

      Hi Arnold,

      You need to edit the file wp-config.php in the top level directory of your WP install and change

      define ('WPLANG', '');

      to

      define ('WPLANG', 'nl_NL');

      and it should work. It will change your whole blog into Dutch, so if you just want the plugin in Dutch, then I’m not sure how to do that. You may need to ask in the WordPress forums. If you find out let me know.

      See http://codex.wordpress.org/Installing_WordPress_in_Your_Language for more details and

  3. Axel says:

    Hi Ian!

    Me and a friend are using and loving your plugin over at http://fotbollsvm2010.com and we thought we’d contribute by doing a swedish translation of the plugin. I couldn’t really find your email anywhere so I hope you’ll answer me via my mail.

    Hope to hear from you,
    Axel

  4. admin says:

    Axel,

    I have e-mailed you.

  5. Arnold says:

    Hi Ian,

    Thanks for your help earlier.
    I already had a dutch wordpress installation. When i changed the wpconfig.php the backend of wordpress changed to english again. But no worries. The users will now have a dutch translation.

    Another question: Example: Is it possible for users to predict matches for 120 minutes (extra time) and no penalty series? Will the system calculate points or will it not?

    • admin says:

      There is nothing to predict extra time, so that’s not possible.

      I’m considering adding an option to remove the penalty shootout prediction, but it needs some extra thought about how scoring would work. For example a user predicts 3-2 and the result is 2-2 with 5-3 pen. to win match. I guess the user would get the win points, but there are other combinations that need considering.

      Ian.

  6. Pingback: World Cup Predictor V1.1 released « World Cup Predictor

  7. Oles Lukas says:

    Thanks you very much for your plugin already translated to Russian by me.
    You can download it from here:
    http://rapidshare.com/files/397909995/world-cup-predictor-russian.zip.html
    Thank you Ian again!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>