Support » Plugin: Polylang » Different HTML code for individual languages

  • Hi, I would like to insert a short html code to my page. Site using 3 languages and I need to use different text on each of them.

    Or the same html code and individually translate it with some php function. Any ideas? Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • How are you adding the html content? Polylang links pages as translations so each translation is a separate page. With that knowledge you can add your content based on the page.

    Thread Starter deGreet


    Thanks for your reply. I would like to add one short HTML code to body of the whole template. Just have it in one place, not separately for every page. It is easy but I don’t know how to use different code for each language.

    Please check the Polylang documentation:
    There are functions to get the current language so you can first check that before adding any HTML content to your website.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Different HTML code for individual languages’ is closed to new replies.