Localization

Translating with .po/.mo files

Language files included are in the Gettext format, which is the standard format used for language files in WordPress. Each plugin contains a .pot (Potable Object Template) file under the languages sub-folder:

  • Directories - wp-content/plugins/directories/languages/directories.pot

  • Directories - Pro - wp-content/plugins/directories-pro/languages/directories-pro.pot

  • Directories - Frontend - wp-content/plugins/directories-frontend/languages/directories-frontend.pot

  • Directories - Payments - wp-content/plugins/directories-payments/languages/directories-payments.pot

  • Directories - Reviews - wp-content/plugins/directories-reviews/languages/directories-reviews.pot

Translate these files using a software like Poedit (recommended) and save the generated MO (.mo) files under wp-content/languages/plugins. Make sure that you append the lang code of your language to the file name. For example, if you are translating directories.pot into French, save the generated MO file as directories-fr_FR.mo.

If you are unsure what lang code is currently used on your site, go to Directories -> System -> System Info, scroll down to the table labelled Wordpress environment and check the value displayed for Locale as shown below:

Note: Some phrases such as labels used for fields, displays, and filters are not translated unless you had your language files ready before activating the plugin. This is because those phrases can be edited from the backend, and it would become a problem if they are overwritten by uploading language files.

Translating with Loco Translate plugin

If you wish to translate phrases in Directories Pro from the WordPress admin dashboard, we recommend using the Loco Translate plugin.

  1. Install and activate the Loco Translate plugin.

  2. Go to Loco Translate -> Plugins.

  3. Click Directories or other Directories plugins that you wish to translate.

  4. Click the Edit link under the language that you wish to translate to. If there is no language that you wish to translate to, click New language and create your language.

  5. Click Sync to make sure all the phrases available for translation are loaded.

  6. Click each row under the Source text column and then enter your translation to the textarea field at the bottom.

  7. Click the Save button above once you are finished with your translations.

Language file location

On the language selection page, click Move under your language and make sure to select System or Custom for Choose a new location for these translations, so that your changes will not be lost when the plugin is updated.

results matching ""

    No results matching ""