How To Translate WP Event Manager And Add-ons Into Any Languages Using POEdit

Опубликовано: 28 Сентябрь 2024
на канале: WP Event Manager ⦿ WordPress
2,742
5

WP Event Manager is capable of being translated into any language using the standard WordPress localization methods and is not necessarily to be used in the English Language.
All language files are located within the wp-event-manager/languages/ folder. There you can find all language files with extensions (.po, mo or .pot). The same languages directory is also used for all additional add-ons. We have various languages which have been translated using Google Translate and many of these have been corrected by native speakers.
If your desired language is not currently translated, partially translated or needs correcting, you can edit or create a translation file that will automatically be used when you are viewing the site in this language. If you update a language file, you can send it over to us and we’ll include it in consequent updates for the benefit of all (and so you don’t need to keep replacing the file each update).
Setting up your Language for the WordPress
We need to tell to WordPress which language it should run.
For WordPress 4.0 and above Version
• You can change the language from the Admin panel. Settings Click on General Click on Site Language.

For WordPress 3.9 and below Version
• Open your wp-config.php file in a text editor and search for:
define ('WPLANG', '');
Edit this line according to the .mo file you’ve just downloaded, e.g. for the German spoken in Germany you must add:
define ('WPLANG', 'de_DE');
Note that if the .mo and .po files don’t exist for a language code called for in wp-config.php then there is no error message, but the code is still used in language_attributes(). This is useful for those of us whose language is similar enough to en_US not to require translation, but who don’t want en-US as the language tag in the blog, instead of wanting some other variant of English.
For example:
Once you’ve added your language code, save the file. Upload the modified wp-config.php file into the WordPress root directory. Open your browser and go to your WordPress site. It should now display in the newly-installed language. See the complete list of language codes and country codes to find your exact locale.
Translating WP Event Manager Using Poedit
1. Download and install Poedit.
2. Find the POT file in wp-event-manager/languages/wp-event-manager.pot
3. Open the POT file in Poedit.
4. When the setting Window Pops-up chooses your desired language and start translating or Click on the “Create new translation” button and select Your language to translate the string. Here, for example, the selected language is German(Germany).
5. For saving translations in.PO a file, Go to File Click on Save as or Save and give file name wp-event-manager-de_DE.
6. When translations will be saved into a PO file, then automatically also generate the.MO file at wp-event-manager/languages/.
7. Upload your PO and MO file to wp-content/plugins/wp-event-manager/languages.

Updating your translation PO File from the POT file
1. Open up the .po file by double-clicking it, or opening it from within poEdit.
2. Go to Catalog Click on Update from the POT file.
3. The POT file is located within the wp-event-manager/languages folder of the plugin.

Generating an MO File automatically on save
• On the menu, go to File Click on Preferences Click on General Tab.
• Be sure that you click “Automatically compile .mo file when saving”.
• Click OK.

Editing/Updating your PO/MO file
• Open up the .po file by double-clicking it, or opening it from within poEdit.
• Start translation.
• Make sure the .po file is also updated.

More info about WP Event Manager: https://wp-eventmanager.com
WP Event Manager Channel:    / @wpeventmanager  

🙋‍♂️ Have a question? Leave a comment below and I’ll do my best to respond.

Facebook:   / wpeventmanager  
Twitter:   / wp_eventmanager  
Linkedin:   / wp-event-manager  
Github: https://github.com/wpeventmanager/wp-...