[wcj_wpml]

Translate any text

Description

[wcj_wpml] shortcode translates any text to language set by WPML.
* WPML plugin must be installed.

Args

lang
(optional) Language code (as in WPML) to display current shortcode content. Can be comma separated list.

Default: None
not_lang
(optional) Language code (as in WPML) not to display current shortcode content. Can be comma separated list.

Default: None

Examples

[wcj_wpml lang="DE"]Guten Tag![/wcj_wpml]
[wcj_wpml lang="EN"]Good day![/wcj_wpml]
[wcj_wpml not_lang="DE,EN"]Hi![/wcj_wpml]

Accessible through:
  • [wcj_wpml]
Tested on WooCommerce 3.2.5 and WordPress 4.9
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

6 Comments

  1. Robert September 2, 2015 at 7:40 pm #

    Hi, I’m not an experienced with shortcodes, so I’ll apreciate if you can give me a more detailed example on how to use the wpml shortcode on a site with 3 languages.

    Thanks!

    Reply to thread

    • Valentin Solovjov September 4, 2015 at 7:57 pm #

      Dear Robert,

      what part of site do you want to use wpml ?

      BR,
      Val

  2. Jean-Marc December 22, 2016 at 10:20 am #

    Hi, I tried [wcj_wpml lang="EN"]Warranty Policy[/wcj_wpml] [wcj_wpml lang="FR"]Warranty Policy[/wcj_wpml] with the Product Tabs Module Title but it doesn’t work.

    Reply to thread

    • Booster Support Team December 22, 2016 at 9:43 pm #

      Hi Jean-Marc,

      I’ve just rechecked the code – it should work as you described. What results are you getting? Empty title? And if possible, please contact me on tom@booster.io with server login details, so I could check it out by myself.

      Best regards,
      Tom

      Booster Support Team
  3. awag September 17, 2017 at 11:09 pm #

    Hi,
    I need to translate verification email sent.
    I tried to put in the settings / Message – Success :
    [wcj_wpml lang="EN"]Guten Tag!Success: Your account has been activated![/wcj_wpml]
    [wcj_wpml lang="FR"]Merci ! Votre compte est maintenant bien activé ![/wcj_wpml]

    but it is not working . any idea please ?

    Reply to thread

    • awag September 17, 2017 at 11:28 pm #

      Ok I found the trick : put lowercase [wcj_wpml lang="en"] instead of [wcj_wpml lang="EN"] !