Facebook Page Promoter Lightbox
Show different version in other language (2 posts)

  1. mattmatt88
    Posted 2 years ago #


    My website is available in german and english (WPML plugin used).

    This php code
    if(ICL_LANGUAGE_CODE=="de") { }
    would check if the german version is displayed. But how can I insert that in the javascript code?

    How can I build two different versions so that a german and an english version is available for the two different sites

    Thank you


  2. Arevico
    Plugin Author

    Posted 2 years ago #

    I've changed this ticket to not a support question, because it is a customization rather than a problem. It is not possible to do this on the server side since the javascript file file is being referenced to (not produced by php). I'd suggest to output the ICL_LANGUAGE_CODE to javascript by using wp_localize _scipt() and than doing the conditional check on the client side.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook Page Promoter Lightbox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.