Enhanced Meta Widget was recently updated for multilanguage support. The number of languages included depends on the number of people who are willing to translate EMW into their own language.

There are two ways to translate the plugin. One is “down and dirty”, a quick way to translate, but may make it a little more difficult to update. The other is more involved, but can be used to offer translations for other plugins/projects, as well as making it a bit easier to update translations when the plugin is updated.

Advice: If a translated version of WordPress already exists, obtain the .po file for it and use it when translating for EMW to keep terms and phrases consistent. I have added comments to the POT file included with EMW identifying phrases that should already be translated for WordPress at large. And while the exact phrase for EMW may not exist in the WordPress .po file, many of the individual terms are there to help you keep words like “post”, “page”, “link”, etc. consistent throughout. You can find all the different languages in which WorpPress has been released at WordPress in Your Language.

Down and Dirty Method

Take the .pot file included in the distribution. In the file you will find
msgid "Meta"
msgstr ""

for every string that needs to be translated. Translated the string in the msgid field and place your translation in the msgstr field (don’t forget the quotation marks). Save the file as “enhanced-meta-widget-your language here.pot” and email the file to me. My email address is in the blog header.

Advanced Method

This method uses Poedit to help you create valid translation files. It also makes it easy to update files as necessary when the plugin is updated.

Step 1: Install Poedit

Download and install the latest version of the program from: http://www.poedit.net/. There are versions for Windows, Linux and MacOS so you can work on any platform with it.

Step 2: Creating new translation project

Select ‘Create catalog from POT file’ from the File menu. Select the POT file to be translated, for EMW that is the enhanced-meta-widget.pot file included with the distribution of this plugin. The program will ask you for the project info, and here you can add info about project, translation langauge and yourself. Please list your name in the Team: field, and your e-mail address in the Team's e-mail address: field. Set the language and country and click ok.

You will now be asked to save the catalog. You can use default.po, but if you save it as enhanced-meta-widget-"languagecode_countrycode".po you can skip step 4 below. (See step 4 for information on language and country codes and appropriate format of file name.) If the POT file is valid, you will see the list of translation strings. If the POT file is not valid you will get information about errors.

Step 3: Translating

Pretty straightforward. Translate all strings. In Poedit there are two fields below the list of strings to be translated. The top field contains the current string to be translated. Type the translated string in the bottom field.

Important: Don’t translate %s found embedded in the strings for translation, just leave them. They represent another value added by the plugin or theme code.

Step 4: Saving the project with the proper naming.

Once the translation is completed, it needs to be saved with the appropriate name. If you already saved the file with the appropriate name in step 2, just save the project and exit Poedit. If not, keep reading.

Poedit will generated two files, one with MO extension and the other with PO extension. Both files should have the same name, but different extensions obviously.
For EMW, the name of the file is enhanced-meta-widget-with language and country codes. Here are examples of the proper file names for the French (France) translation:

  • enhanced-meta-widget-fr_FR.mo
  • enhanced-meta-widget-fr_FR.po

If there were a translation into French Canadian the files would be named:

  • enhanced-meta-widget-fr_CA.mo
  • enhanced-meta-widget-fr_CA.po

Complete lists of codes can be found at (language codes) and (country codes).

Step 5: Updating the translation

If the plugin POT is updated, the translation files will need to be updated. I will state that the POT file has been updated in the release notes if it is updated.

Open the PO file of your translation (i.e. enhanced-meta-widget-fr_FR.po) in Poedit and select ‘Update from POT file’ from the Catalog menu. Point to the new POT file, and Poedit will show you the new strings to be translated and and them to your translation files. It will also show you any obsolete strings and remove them from your translation files. It will try to recognize the changes and offer you the ‘fuzzy’ translation.

After you have saved your translation files (new or updated), send both the *.po and *.mo files to me by e-mail and I’ll update the plugin distribution. E-mail address is neurodawg@hebers.us.


6 Responses to “Translating EMW”

  1. xplane Says:

    I’ve made a translation in German language.
    Please give me your eMail-Address, in order to share my german (de_DE) PO/MO-files.

    1. NeuroDawg Says:

      Thank you. I sent you an e-mail.

  2. Stig Ulfsby Says:

    Thank you for this grat plugin! I have translated it to norwegian. If you will include the files in the plugin, please send me a mail.

    I use the plugin CodeStyling Localization to do the translation, this is doing translation partly automatic using Google translator and is much more efficiant than using Poedit. It was a problem in this case that the files were not placed in the correct directory, so I had to move them.

  3. I’ve made a translation in Portuguese language.
    Please give me your eMail-Address, in order to share my portuguese (pt_PT) PO/MO-files.

  4. Hello,
    I have just updated the translation to Norwegian bokmal (nb_NO), and have also made a brand new translation to Norwegian nynorsk (nn_NO). Please let me know where to send them. 🙂

    By the way; thank you for a great plugin. I definitely prefer this one instead of the new WordPress admin bar.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s