This is a tip that lacks in tips and tricks. I noticed some time ago that some people still have some difficulty understanding how certain PoEdit works, the configuration and the relationship of parameters / variables translation (_e, __, n_, m_, other variables.)
1 - First, you must download your language pack in your country osclass market for your project.
/oc-admin/index.php?page=market&action=languages
2 - Ensure that all new tags that you entered contains the variable (<php _e ('words to translate', 'The theme name';?>) For translation (even the default)
Example of an new tag added for translate:
<h1><?php _e(‘Complete your posting accepting terms and conditions of this service’, ‘cocktail’); ?></h1>
3 – Now configure Poedit open your theme.po
Press the keys ‘Alt + Enter’ for open the properties
Follow the example and encodings:
Now you have to point the complete main board.
Then you have to point out all the files in that folder, then you should put (.) (One dot) to PoEdit understand that should translate all the files that are inside that folder.
You can also use directories to translate plugins, however the po file is longer and perhaps confusing, I have no problems in this regard, and use all in one.
Now the final part of the configuration
Need save your file after close.
Now you need update your translation
Open your theme.po file
Click on Update button
Need waiting...
Remember, if the update failing, is because you have main directory incorrect, and need change this. (Base path)
If you have new php files or other pages must add new directories for sub folders, or put in the root of your theme to be detected in the translation.
EDIT:Some words or phrases was not translated?Well, here is why these words or phrases were not detected by Poedit. There's only two possible reasons why this happens:
1 - Missed the last parameter matches the name of your theme folder, example (<php _e ('I want to translate', '
name of my theme folder')?>
2 - Missed path to a particular folder or subfolder.
When it comes to plugins to translate, usually most plugins already behind a folder "languages" parameter translation is different from the name of your theme folder (typically the name of the plugin) example: (<php _e ('I want to translate', '
plugin name')>
So in this case for plugins, you just have to open the file 'po' existing in your language folder. If the folder does not exist for your language, in this case you have to create an respecting their initials of country (language) .
The second step will be to open PoEdit, create a new file for translation, follow the 3rd step of the first initial post of this tutorial, and configure Poedit to the new translation file.
Some words or phrases of your plugin has not been translated?You have to check all php files of your plugin, and verify that all parameters of translation are actually correct, example:
(<? php _e ('I want to translate', '
plugin name')>
Or:
(<? Php __ ('I want to translate', '
plugin name')>
If you always follow this rule, and all paths for translation, correct configuration for each .po file, everything will work fine.I think there's not much to say, but if you have questions you can post it here.
Regards