Translating .PO files using Google translate

So you need to translate some plugin or theme to your native language and have been handed one of those pesky .pot / .po files?

You’re lucky the plugin at least supports language files, but unlucky that you now have a mountain of small lines to translate. You could download a tool like poedit and slog through the translation, but I felt there has to be a way to populate the file with at least some of the required translation, saving some of the grunt work. Fortunately Google delivers (although oddly I did not find the link through my initial google search!)

Google translate has a workbench for PO files: http://translate.google.com/toolkit/list?hl=en#translations/active

Obviously you need a Google account. This tool gives you a simple side by side workflow where you can see the original and edit the translation, but more importantly: Google will make a best effort attempt to translate your file for you!

Let’s take a wpjobboard po file as an example and upload this:

You select the orange upload option:

overview

Then you proceed to select the .PO file with the original language. Be sure to save the result as filename-nl_NL (in case of the Dutch version). If you are unsure about the correct language, check your wp-config.php file for the correct name.

upload

Once you select “upload for translation” the file will be uploaded and Google will attempt to translate the contents to the language you selected in the previous screen. This is where you go through the translations one by one to ensure they are correct.

Basically the blue entries are the ones Google believes are correct. The red entries were translated, but had some issues. Most automatic translation tools attempt to reverse translate their translations to verify. Red does not have to mean the translation is wrong, just that the system is unable to validate automatically.

translating

When you are finally done you can complete the translation. The file -> Download… gives you the resulting file. This file will need to be uploaded to the location specified by your plugin.

4 thoughts on “Translating .PO files using Google translate”

  1. Im try to translate a theme, but change the code (make spaces) another thing, is I have to check every word? how can I translate everything?

    Thanks

Leave a Reply