Business Directory is prepared to work with WPML. You don’t need to enable or configure anything.
Business Directory will try to honor your WPML settings and act accordingly. That being said, there are some things to consider when using WPML to translate your directory:
- Familiarize yourself with WPML. Read the Getting started guide available at WPML.org.
- In order to translate your directory, the first thing you need to do is translate the page containing the main shortcode (i.e., the main directory page) to each one of the languages you intend to support. These translated pages should still contain the main shortcode ([businessdirectory]) but you can name them in the correct language.
- Since listings are just custom posts and categories/regions/tags are custom taxonomies, you can use WPML to provide translations for all the content managed via Business Directory Plugin.
Translating form fields and fees
To translate form fields and fees, you need to install the String Translation module from WPML.
Once the module has been installed and activated, you’ll find a menu item called String Translation under the WPML menu, where it is possible to provide translations for field labels and descriptions as well as fee names and descriptions.
You can filter by domain Business Directory Plugin if you only want to see strings related to Business Directory.
For more information on how to use the String Translation Module, please visit the Getting Started guide at WPML.org.
Important: If, for some reason, you don’t see fields and/or fees strings on the String Translation screen, try visiting the form fields screen (Directory → Form Fields) and/or the fees screen (Directory → Fee Plans) and save any item after editing it. You don’t actually have to change anything. The save will trigger a string database update.
Translating taxonomies (regions, categories, tags)
- Read the Translating post categories and custom taxonomies guide from WPML.
- Navigate to the Taxonomy translation tab (or WPML → Taxonomy translation). From here, select the taxonomy you want to Translate. Our WPML integration will already have set “Directory Categories” and “Directory Tags” to be translatable. If the Regions module is enabled, you will need to manually set “Directory Regions” to be translatable.
- WPML offers several ways to translate taxonomy terms. You can do so while editing a term, but we recommend the use of the Taxonomy Translation screen (WPML menu) since it enables you to translate terms in batches.
- Please keep in mind that once you decide to translate a taxonomy, untranslated terms will stop appearing on the front end when you browse a language-specific version of the directory. For instance, when you are browsing the Spanish version of the directory page, you’ll only see categories, tags, and regions that have been translated to Spanish. Untranslated regions (and their listings) won’t be available.
- (For Regions users) Since WPML translates terms by creating new entries in the database, translated Regions work independently from Regions in the original language. This results in the flags that control whether the region is enabled or displayed on the sidelist to now be language-specific.
Settings from the original regions won’t be automatically migrated. You can filter regions by language using a row of filters that appears on top of your regions on the Regions screen:
- (For Enhanced Categories users) Due to the way WPML works, category images are language-specific. When you translate a
category, you can assign it a category image that is shown only for that language. If no image is assigned, the image
from the default language won’t be used for the translated term.
To provide translations for your listings, follow the following steps:
- Read WPML documentation on Using the translation editor.
- Use any of the mechanisms available via WPML to translate your listings. One way to do so is to click the Plus [+] icon beside any untranslated listing on the Directory screen:
When you’ve enabled the translation of listings, an additional row of filters will appear on top of your listings. You can use those filters to find untranslated content easily:
Important: If you chose to translate taxonomies (see above), you will only be able to assign already translated categories or regions to your translated listings. If you translated taxonomies, you can’t mix listings in a language with categories or regions in a different one, regardless of the original language. This also applies to the front end. Untranslated listings won’t appear inside translated categories or regions.