WPML Multilingual
Introduction
Installation
Settings
Support
FAQ – Frequently Asked Questions
Introduction
Your directory can can feature listings in multiple languages by using the GeoDirectory V2 Multilingual addon with WPML. GD Multilinugual is a bridge between GeoDirectory V2 and WPML.
WPML is NOT required to translate your site if:
- Your site is in only a SINGLE LANGUAGE (not en_US) or
- you only want to translate the administration/backend of GeoDirectory into multiple languages.
If those cases apply to you, you don’t need WPML, and you can use the standard translation method with PO files described here:
https://wpgeodirectory.com/docs-v2/translation/overview/
WPML is specifically for translating listing content. You will need at least the free WPML blog version, or, if you want to manage the translation of strings, then you will need a premium WPML version that includes WPML String Translation.
Installation
Preparation
Check to be sure you have the following plugins installed before you get started.
- GeoDirectory V2
- GeoDirectory V2 Multilingual
- WPML Addons (see WPML Site for install information)
- sitepress-multilingual-cms
- wpml-translation-management
- wpml-string-translation – Optional, but necessary for string translation
- wpml-media-translation
- wpml-sticky-links
Installation
Settings
GeoDirectory Multilingual ‘just works’ when WPML is installed, functioning in the background as a bridge.
There is only one setting available, located at:
Custom Post Type (ex. Places) – Settings – General – Show Advanced – WPML – Enable frontend duplicate?
Pages
All GD Pages and templates will need to be re-created in different languages including the Search, Details, Location, and Archive template. WPML provides a meta box to create the linked page in the WP Backend editor. Use that option to create the translated duplicates.
Design – GD > Post WPML Duplicate
If you have already enabled the option for frontend translation, then next add the GD Post WPML Duplicate element to your sidebar for the detail page. This will give the listing owner and admins the option to translate the listing into other languages.
Title and Meta
Single Site Language
To load GeoDirectory Title and Metas in a single language, translate the strings directly using the GeoDirectory settings at:
GeoDirectory – Settings – General – Title and Meta
Multiple Site Languages
To load the GeoDirectory Title and Meta in multiple site languages leave all the GeoDirectory settings blank at blank all the strings at:
GeoDirectory – Settings – General – Title and Meta
Instead, choose one of two options.
- Translate with WPML – String Translation
- Translate PO files with POEdit (standard translation method)
Custom Fields
Single Site Language
If you are translating into just one language, then translate the field settings in the Custom Fields tab at:
Places – Settings – Custom Fields – Field – Translate the Label, Description and Validation message
Multiple Site Languages
If you are translating into multiple languages, then you have two options:
- Translate with WPML – String Translation
- Translate PO files with POEdit (standard translation method)
Translate Custom Fields with WPML – String Translation
- Create your custom fields using the site default language.
- Visit the GeoDirectory Tools and run the DB text translation tool – https://wpgeodirectory.com/docs-v2/geodirectory/status/#translate
- The tool will have created a new file :
/wp-content/plugins/geodirectory/db-language.php
- Visit WPML Settings to trigger WPML to scan that file (automatic)
- Visit WPML – String Translation to see the new strings and translate them.
Image Titles and Captions / Alt
Image titles and captions cannot be translated.
Comments
Comments cannot be translated.
Importing Translation
When you export listings csv, it contains three columns wpml_lang, wpml_translation_of, wpml_is_duplicate.
– wpml_lang : post language. ex: de
– wpml_translation_of : in post is translated then original post id from which this post is trsnalated.
– wpml_is_duplicate : if post being imported is duplicate or normal translation. 1 = duplicate translation & 0 = normal translation. (If you use the WPML front duplicate, this will be 1)
Get Support
Get support on our forum, find out more here: https://wpgeodirectory.com/docs-v2/v2/support/
FAQ – Frequently Asked Questions
How can I translate the country slug?
See this document: https://wpgeodirectory.com/docs-v2/translation/country/
How do I install WPML?
See: https://wpml.org/faq/install-wpml/#first-install
How do I setup WPML?
See: https://wpml.org/documentation/getting-started-guide/
I have chosen to setup WPML using the variable in the URL, but sometimes the variable gets dropped. What can I do?
We recommend you choose the first option as shown here to avoid that issue:
Uninstall WPML
Make sure to follow WPML’s in-plugin instructions to make a complete removal of WPML. If you do not use the uninstall function WPML will leave database table entries that can continue to have an effect on your site. For support with leftover WPML data or translation please seek support from the WPML plugin authors. If you have leftover translated strings or slugs after you have deactivated WPML, you should reinstall WPML and addon and then perform the uninstall by using the WPML options for “Reset” to remove translated strings. https://wpml.org/documentation/faq/
Translate Events
To enable translation for GeoDirectory Events (gd_event CPT):
WPML > Settings > Post Types Translation > Tick Translatable for “Events (gd_event)”
WPML > Settings > Taxonomies Translation > Tick Translatable for “Event Categories (gd_eventcategory)” & “Event Tags (gd_event_tags)”