CM Tooltip (CMTG) - API - Google translate

Using Google Translate with the Glossary

The CM Tooltip Glossary Pro+ and eCommerce editions support adding a Google Translate API to tooltips and term pages, to help translate their content from one language to another. This feature is particularly useful in cases where a website is meant to serve a bilingual community.
In order for the Google Translate API integration and functionality to work, the server must have a PHP cURL library installed!

How to integrate Google translate into the glossary?

If you choose to integrate a Google Translate API, you will need to have a Google API key, which can be easily obtained from Google (this of course will cost money based on the usage).

To obtain an API key for translation please follow the  instructions from Google.

Next, enter the CM Tooltip Glossary plugin settings panel and set the following definitions:

  • Add the API key
  • Choose a source language (language in which the original text is written)
  • Add the target language (to which the original text will be translated) Source and target languages can be also modified using the following shortcode:

Further options for the Google translate API integration:

After setting up the technical options there are two ways how the API integration can work.

  1. Check the box “Display translation and original text together?” if you want both source language and target language to appear side by side in the tooltip. If it's not checked then only the translation will be displayed.
  2. Alternatively, you can choose "Display translated term name in tooltip?" in this case, only the translated term name will be displayed in the tooltip (overwritting the term definition)

CM WordPress Plugins- Google translate API

How to exclude certain terms from using the Google translate API

Each of your term page editors contains a metabox with tooltip override settings that only apply on the specified term. check the box “Disable Google translate” API for this term” to hide the specified term’s translation on all pages and posts, as shown in the image below:

override the tooltip settings by disabling the google translate API in the term page

Using shortcode

The Google translate is also supported using a shortcode. This can work on every post or page regardless of a term page already defined for the term itself. 

The shortcode includes the following parameters.

{glossary_translate term="welcome" source="english" target="spanish"}

Please note that when using this code, you should use brackets -[]- instead of braces -{}.


More information about the CM Tooltip Glossary WordPress  Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center