Multilingual Directory

Directories Pro is compatible with WPML and PolyLang. Using one of these plugins, you can have any directory content as well as custom text strings added by yourself such as form field labels displayed in multiple languages.

Note: Directories Pro is currently not compatible with Advanced Translation Editor provided with the WPML Translation Management add-on.

Installation

You will need to install either WPML or PolyLang on your WordPress site.

WPML

For detailed instructions on installing the WPML plugin, visit the following page: https://wpml.org/faq/install-wpml/

Other than the core WPML plugin (WPML Multilingual CMS), we also recommend installing the WPML String Translation plugin for translating custom text strings.

PolyLang

PolyLang is a free plugin that you can download from WordPress.org. To install the plugin, go to the Plugins page in the WordPress administration dashboard and follow the usual steps for installing a plugin.

Setting up a multilingual directory

The first thing you must do to setup a multilingual directory is to create frontend pages for each language you have enabled in WPML or PolyLang.

  1. Login to your website if not yet logged in and go to the WordPress administration dashboard.

  2. Click Pages -> All Pages from the side menu.

  3. For all the pages currently set up with Directories Pro (see Directories -> Settings -> Pages), create a copy for the language you wish to enable by clicking the plus sign displayed under country flags.

    Important: You can not use the same slug for multiple languages. For example, if the directory main page for English is directory, you can not use that slug for any of the directory pages in other languages. Unfortunately that will not work in Directories Pro.

  4. After creating a copy for all pages, click Directories in the admin sidebar, and go to Settings -> Pages.

  5. Using the language switcher at the top of the page, select the language for which you have created pages in step 3.

  6. Under the Page Settings section, assign pages by selecting pages created in step 3 and press Save Changes.

  7. Repeat steps 3-6 for all other languages you wish to enable.

In addition, follow the steps below to enable translation of listings, categories, tags, and locations:

WPML

  1. Select WPML -> Translation Options from the side menu.

  2. Scroll down to Custom posts and select Translate for Directory - Listings and press Save. Note that you do not need to select Directory - Reviews or Directory - Claims.

  3. Scroll down to Custom taxonomies and select Translate for Directory - Categories, Directory - Tags, and Directory - Locations and press Save.

PolyLang

  1. Select Languages -> Settings from the side menu.

  2. Click Settings under Custom post types and Taxonomies and check Directory - Listings, Directory - Categories, Directory - Tags, and Directory - Locations and press Save Changes. Note that you do not need to select Directory - Reviews or Directory - Claims.

Now you are ready to start creating multilingual content for your directory! See the following page for details on adding translations for your content items.

Translating custom text strings

Custom text strings such as field labels that you configured in the backend can not be translated with .po/.mo language files since those text strings do not exist as predefined phrases. However, the string translation feature of WPML or PolyLang lets you translate custom text strings from the string translations section in the backend.

  • WPML: Select WPML -> String Translation in the side menu.
  • PolyLang: Select Languages -> Strings translations in the side menu.

When you click the domain (or group in PolyLang) dropdown list you may already see several ones prefixed with drts-strings-. Thesse domains (or groups) are the ones that contain your custom text strings.

  • drts-strings-dashboard_panel - Contains text strings for dashboard panel and link labels.

  • drts-strings-directory_directory - Contains text strings used for directory labels.

  • drts-strings-display_element - Contains text strings used for displays and filters.

  • drts-strings-entity_bundle - Contains content type labels such as Listings, All Categories, and %s listings.

  • drts-strings-entity_field - Contains text strings used for form field labels, descriptions, and options.

  • drts-strings-location - Contains text strings for location input form field labels.

  • drts-strings-search - Contains text strings used for search form labels and placeholders.

  • drts-strings-view - Contains text strings for the filter form.

Simply select a domain (or group) from the dropdown list and start translating the strings to make them multilingual.

Auto register strings for translation

If you do not see any strings registered, go to Directories -> Settings -> System and switch on the Auto register strings for translation setting. This will automatically register strings while pages are rendered in the frontend. This feature may slow down your site significantly so make sure to switch if off once your custom text strings are registered.

Generating translations

You can use the Generate translations system tool to generate translations for any content items and also copy field values from original content items to translations.

  1. Login to your website if not yet logged in and go to the WordPress administration dashboard.

  2. Click Directories in the admin sidebar.

  3. Click the System tab and then the Tools sub-tab.

  4. Scroll down the screen and then click the Generate translations button.

    You can switch on the Overwrite field values of existing translations setting to copy field values of source language content items to translations that already exist in your directory.

  5. Click Run Tool to generate translations.

Common issues

404 page not found error when viewing single listing or term page

Go to Directories -> Settings -> Pages and re-save the settings for all your languages. Then, visit Settings -> Permalinks (this is WordPress settings) which will automatically clear the URL rewrite rules cached by WordPress (no saving is required on this page).

Custom labels are not registered for string translation

Go to Directories -> Settings -> System and switch on the Auto register strings for translation setting. Then, visit the page(s) in the frontend where those custom labels are displayed, which should automatically register those labels for string translation. Make sure to switch the setting off once your custom labels get registered.

results matching ""

    No results matching ""