Translating Custom Fields


If your site is only in one language, you create your custom fields in the language used on your site.

But if your site is in more than one language, you will need to use WPML. The instructions below are different depending on the version of WPML you use. The String Translation module is only available in the Multilingual CMS version of the plugin.

Translating Custom Fields using WPML’s String Translation module

  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 GD > Tools > Load custom fields translation:
  4. This will scan your DB for custom fields and copy them to a file in your geodirectory plugin folder called db-language.php
  5. WPML will then be able to scan this file and allow you to translate them.
  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:



Translating Custom Fields without WPML’s String Translation module

  1. If you are only using the WPML blog version, 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 that file and your GD core language file to your computer and then open the .po file and rescan the project.
  4. This will add the translations to the .po file and you can then follow the normal translation process as explained here.
  5. Below you can learn more about the process for merging the custom field data with the normal language files.


  1. After you scanned the database for custom fields, download a copy of the GD core plugin from your server to your local computer using FTP:
  2. Then open /wp-content/plugins/geodirectory/geodirectory-languages/geodirectory-en_US.po using PoEdit:
  3. From the catalogue menu, choose Update from sources ...:
  4. That will merge db-language.php:
  5. Save the file and then follow the instructions for translating your core language file [first time translation] or updating your language file [if already translated earlier].