Adding languages to WordPress plugins with Poedit

translating-wordpress-plugins

Your plugin supports language files but the plugin is not available in your language?
We’ll help you to create a language file for the plugin!

Get the plugin

Just download the plugin which you want to translate and extract it. In our example its c:\myplugin.

Download Poedit

To translate the plugin, you can use Poedit. You can get it on www.poedit.net. After downloading you have to install the plugin.

Using Poedit

After you have installed the plugin the best way is to open an existing language file in annother language. Open Poedit and click on “File/Open…”. Choose a language file from the plugin in c:\myplugin. It’s not in it? Just check in subdirectories.

After you have opened the file, the whole list with the translation in the opened language will appear. Now you have to save the language file for your language. Click on “File/Save as…” and save it in the same directory you opened the language file . You only have to take care on the file name. As you see, in SeoPress or the german language file is named seopress-de_DE.po.

Example: If you want to translate it in the hungarian language the file have to seem like this: seopress-hu_HU.po.  With which filename your language needs, you can see here: WordPress in your language on wordpress.org.

Updating the catalog file

Now you have to set up  the language file settings. Click on “Catalog/Settings…” and there will appear the settings box for the language file. First you have to add the path of the plugin files. In our case its c:\myplugin.

After setting up the path, you have to add the keywords. For WordPress we need the Keywords __ (double underscore) and _e (underscore and e). Just click on OK.

Now you can update your language file with the plugin source code by clicking “Catalog/Update from sources” and Poedit will update the translation strings and you are ready to begin your translations.

Just click on the strings on the line you want to translate and save the settings. If you’re uploading the plugin again and wordpress is in the language you have translated, your translation will work.

Thats it! Have fun!

 

 

  1. Avatar of mahype

    mahype says:

    Hello nati,

    just do it as described above. If you don’t want to translate an element, just leave it blank in PoEdit.

    Greetings,

    Sven.

  2. RckrGrl says:

    Hi, I am just working on this task for a site (running locally) but I cannot get the translations to work.

    I would like to customize buddypress 1.5 and I am using the custom community theme.

    I have tried your directions as well as the directions in the bp codex (there is a slight difference) as well as a plugin called CodeStyling Localization and still nothing.

    any thoughts?

    • Avatar of konrads

      konrads says:

      hi, in the theme’s language folder is xx_XX.pot

      also this might be interesting for you: http://themekraft.com/groups/custom-community/forum/topic/custom-community-time-to-translate/

      hope this helps, konrad

  3. Avatar of 1jealeksa

    1jealeksa says:

    Hello,

    first of all, thanks for good framework. I’m testing a free version, and so far I’m satisfied. What is interesting me is, do you have .po files for it? If so, could you send it, so I can translate it in Serbian?

    Regards,
    Aleksa

    • Avatar of svenl77

      svenl77 says:

      Yes, you are welcome to translate it in Serbian. Please have a look to the github version. We are just about to make a huge update and it makes much more sense to translate this version. The .po can be found in the language folder https://github.com/Themekraft/Custom-Community

  4. Tobias says:

    Hello,

    i have a plugin without any .po file. The main language of the plugin is english. must i create now a clean .po file first? or how can i translate the plugin?

    Regards Tobias

  5. mya91 says:

    Hi,

    I can not find any .po file in the folder languages in my plug in..does that means that it’s immposible to translate it? I have also tried with localizator i have translated whole theme, but plug in – i can’t …can you help me?ž

    Thanx

  6. Jan says:

    Editing the .po files is nice and poedit is a nice tool.
    However, there is a plugin available which uses poedit under the hood and makes the translation work a lot easier as it supports the translation from the WordPress Admin center directly.

    Check out https://wordpress.org/plugins/codestyling-localization/ for this plugin.

Leave a Reply

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

379 Spambots Blocked by Simple Comments

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>