WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mattmatt88
    Member
    Posted 7 months ago #

    Hello,

    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

    http://wordpress.org/plugins/facebook-page-promoter-lightbox/

  2. Arevico
    Member
    Plugin Author

    Posted 7 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.