How to Translate Custom Fields with WPML

If your site is in more than one language, you can use the WPML plugin to manage translations and translated content. The instructions below may vary slightly with different versions of WPML. The String Translation module is only available in the Multilingual CMS version of the plugin.

Translating Custom Fields using WPML's String Translation module

The String Translation module is only available in the WPML Multilingual CMS version

  1. Make sure you have selected to use String Translation, use one of the two options:
  2. Create your custom field, and enter description, front end title etc. For this example we are creating a text field:
  3. Then go to GeoDirectory > Status > Tools > DB text translation:

  4. This will scan the database for custom fields and copy them to a file in your geodirectory plugin folder called db-language.php
  5. WPML will now be able to scan this file and allow you to translate the custom fields. Go to WPML > Theme and plugins localization > Strings in the plugins > GeoDirectory > Scan selected plugins for strings

  6. To translate them go to WPML > String Translation, where you will see the new fields added:

  7. Now you can translate them and save:

  8. This would be the result on the Add Listing page: FrenchEnglishDutch

Translating Custom Fields without WPML's String Translation module

  1. If you are only using the WPML Multilingual blog plugin, then first follow steps 2 and 3 as explained above.
  2. That will create a file called db-language.php that you will find in your geodirectory folder on the server.
  3. Copy all files in the geodirectory folder to your computer:

  4. Open the /wp-content/plugins/geodirectory/geodirectory-languages/geodirectory-en_US.po file with poEdit

  5. From the catalogue menu, choose Update from sources ...: 
  6. That will re-build the geodirectory-en_US.po file:
  7. Save the file.
  8. You now have a new base language file including the new custom fields. You can now use that file to create your other language files, read more at How To Translate Or Localize GeoDirectory
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us