General Description

Any of you have probably faced the problem related to theme localization for Wordpress. To be more specific, the localization itself do not cause any broblems, but futher updates may bring some troubles: we get a new .po-file, where some lines have changed, some have added, and some of them have deleted. And all of it is scattered about the file in different place!

For instance, you bought the theme that includes only the english version. Normally, these are the files "en-EN" or "en-GB" located in the subfolder "languages of the theme folder. You need translation into your mother language, e.g. German. You have copied the files "en-GB.po"and "en-GB.mo" inside the folder 'language' and have named them "de-DE.po"and "de-DE.mo" respectively.

Then, you have launched the programm for editing the .po-files (e.g., POEdit) and translated all strings into German. Congrats! You've done such a huge job!

However, after a while you find out that an update of your theme was released! You download it and... here comes the most interesting part :( The translation file has changed! It now has new lines, and some of the old ones have changed. How to find what exactly have changed? Obviously, you don't want to translate it all over again...

Or, you simply want to create translation file for your languange, but you don't have a .po-file editor. Sure, you can edit a .po-file using a regular text editotr. But how to get a corresponding .mo-file?

For many of customers, these problems become one of the reasons why they stop updating their themes. Of course, another good reason is the fact, that users have already made a lot of chages to the theme (logo, style tables etc).

By the way, to make update of WordPress themes easier, it is not recommended to make changes into the theme files, it is preferable to create a child theme based on your theme, and make all changes there. In that case, after updating of the parent theme, you at least won't lose the changes you've made.

What we offer:

  • Plugin "PO Composer" will help you solve one of the problems related to theme update: it will help you easily find new and not changed strings for translation. Basically, this plugin will simply prepare an updated translation file for you, where all the strings you have translated before will be added. If you like, you'll be able to move all translated strings to the end of the file. And to do (to be more precise, to complete) translation will be easy as ABC.
  • Using the plugin you will also be able to edit any .po-files (both already existing on your server and the ones being uploaded), and then generate corresponding .mo-fiels for them.
  • If the plugin is allowed a record to the folder "languages", it will be able to update the .po-file in the folder with the current theme independently!

Installation

It is very easy to install the plugin. Go to Dashboard, open "Plugins - Add New", and on the tab "Upload" int he field of file upload select the file "po_composer.zip".

Another way to add plugins to Wordpress: simply copy the folder with the plugin into the folder "/wp-contents/plugins"on your website!

As a result, you will get a new menu item "Tools" - "PO Composer".

How it works

Now, you opened the plugin page in the menu "Tools - PO Composer". What's next?

PO Composer page

You see two sets of fields: on the left - the fields to select .po-file to edit (a file from the folder with a parent or child theme, any downloadable file, or even text from the Clipboard); on the right - fields to select. Po-file to be merged with the one selected on the left (if needed). If you do not want to merge files, but only edit one of them - simply do not select anyting in the right section.

So, what options are available?

  1. Upload .po-file - This option allows to selcet any .po-file from your computer and upload it for editing.
  2. Edit .po-text - This option allows text of any .po-file into the text field and edit it.
  3. Parent languages/parent_xxx - This option allows to select one of the .po-files in the folder"languages" of the parent theme on your server.
  4. Child languages/child_xxx - This option allows to select one of the .po-files in the folder "languages" of the child theme on your server (this option is available only if the child theme is active at the moment)

If you tick "Move translated strings down" - in the .po-files all translated strings will be moved at the end of the file.

Variants of use:

  1. If you want to edit one of the language files in the fodler with parent or child theme:
    In the left block of settings, select an option "parent_xxx" or "child_xxx", where "xxx" is the name of the translation file you want to edit, and then click the button "Load" under the left block.

    Edit language file

    The text of the selected file will appear in the field for editing:

    Edit language file

    You can make changes directly to this file. Attention! Be very careful when editing these files. It is important not to break the structure of the file and not to remove special characters accidentally. Therefore, this way of editing can only be recommend to very experienced users.
    Fortunately there is another, much safer way: switch to the tab"Strings editor"and you will see the list of strings for translation. Below the list, there is a field for editing the current string. You simply scroll through the list and edit string by string. Strings that have been translated appear in the list in a different color.

    Edit strings list
    When finished editing - switch back to the tab "Plain text" and click "Update" to generate .mo-file and update the file on the server (if allowed to record on this file).

    Update after editing

    After updating the information on the server, you'll get links (buttons) for download of generated. PO and. MO-files. If the server has permission for file record in the subfolder "/ languages" of the theme folder - the relevant files will be automatically updated. If the record is prohibited - just download the generated files using the links and update them on your server manually.

    Update after editing

  2. Editing the random .po-file:
    In the left block of settings, select the option Upload .po-file and click the button "Upload" below the left block.

    Upload file

    The text of the selected file will appear in the edit box:
    Edit language file

    All further steps are completely analogous to those we have described in the previous example.
  3. Editing text from the Clipboard:
    In the left block of settings, select the option Edit .po-text and into the text field insert the text from the Clipboard:

    Edit plain text

    All further steps are completely analogous to those we have described in the previous examples (see above).
  4. Merging different versions of translation file:
    For example, you are using the child-theme. You have updated the parent theme, and the folder with the child-theme in the subfolder "languages" contains old language files. . You want to update the language file in the child-theme by adding the new and changed strings of the updated theme and keeping all your previously translated strings. On the left, you need to select "parent_xxx", and on the right - "child_xxx" (where "xxx" is the language code) and press the button "Merge":

    Merge files

    The text of the merged file will appear in the edit box:
    Edit merged file

    All further steps are completely analogous to those we have described in the previous examples (see above).

Forget the agony with the translation update ;)!

Once again, thank you so much for purchasing this plugin. As I said at the beginning, I'd be glad to help you if you have any questions relating to this plugin. No guarantees, but I'll do my best to assist. If you have any questions that are beyond the scope of this help file, please feel free to email via our user page contact form from our Profile Page on ThemeForest. Thank you so much!

ThemeREX