PO Composer Part 3 Merge po files

Опубликовано: 06 Март 2014
на канале: Themerex
1,032
0

http://codecanyon.net/item/po-compose...
WordPress Theme: https://themeforest.net/item/puzzles-...
Author: https://themerex.net/

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 problems, 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.