View Categories

Translating the plugin with WPML

2 min read

Overview #

WP Go Maps Basic and Pro support translation with WPML.

WPML allows you to easily translate the user interface of WP Go Maps on your site. This document does require you to have WPML installed on your site.

The following documentation shows how to add translations for WP Go Maps within WPML, and assumes that you have already Set up WPML on your site.

Setup #

Prerequisites #

The Following Plugins need to be installed and active

  • WP Go Maps
  • WP Go Maps Pro Addon (optional)
  • WPML Multilingual CMS
  • WPML String Translation

Please note: From Version 10 we now support dynamic content translation, meaning you can translate Markers, Shapes, and Settings within the plugin!

Translate Page/Post #

Navigate to the page/post where the WP Go Maps shortcode or widget will be placed.

Ensure the page is translated to the target language to fully support language switching.

Ensure your page is translated

Ensure your page is translated

Scan WP Go Maps for translation strings #

Navigate to the “Themes and plugins localization” area within WPML

WPML -> Themes and plugins localization

Access WPML plugin localization area

Access WPML plugin localization area

Select “WP Go Maps” and/or “WP Go Maps – Pro Add-on” and click “Scan selected plugins for strings”.

Document image

WPML will scan and locate all the strings within our plugin which can be translated.

Translation string scan results

Translation string scan results

Once the scan is complete, you should see updated string counters within this area.

Updated string counters

Updated string counters

String translation #

Navigate to the “String Translation” page

WPML -> String Translation

Access String Translation area

Access String Translation area

Search for the string that you would like to translate with WPML.

Click on the “+” icon under the flag of the language that you would like to translate.

Select string to translate

Select string to translate

The translation window will appear where you may enter in your preferred translation.

You can save your translation by hitting the Enter or Tab keys on your keyboard or by simply clicking out of the window.

Translated String

Translated String

Once you have completed translation, they will become available on your site, depending on the language option selected.

Example #

We have prepared an example of our store locator, translated with WPML below.

Before #

Map Before Translation

Map Before Translation

After #

Map After Translation

Map After Translation

Troubleshooting #

Should you be experiencing issues whereby the translations are not being implemented on the frontend, please may you enable the “Look for strings while pages are rendered” setting (WPML -> String Translation).

Look for strings while pages are rendered setting in WPML

Look for strings while pages are rendered setting in WPML

Dynamic Translation – Markers, Shapes, and Settings #

From Version 10 of WP Go Maps, we now support dynamic content translations with WPML. You do need to opt in for this via:

Maps > Settings > Integrations > WPML > Enable Dynamic Translations

Once enabled, whenever you edit/create a marker we automatically register the relevant strings for translation in WPML. The same is true for shapes, and our map settings, such as fields/labels for your maps.

For existing markers/shapes, we will detect these the next time they are loaded onto a map and automatically register the translations with WPML!

Where can I translate Markers, Shapes, and Settings within WPML? #

Simply navigate to the String Translations area of WPML

WPML > String Translations

From here, select the WP Go Maps Content text domain from the filter list, and filter your content:

You should see all settings and shape data registered here from translation:

We use unique names for each value, which include the marker, shape, category, or map ID to assist with verification. Once you have translated the content accordingly, you will be able to view the translations on the frontend by viewing your site in the appropriate language:

How do I enable dynamic translations? #

If you would like your marker, shapes and map settings to be translatable, you will need to opt in at:

Maps > Settings > Integrations > WPML > Enable Dynamic Translations