• Resolved gen0200

    (@gen0200)


    My Divi WordPress website uses Translate Press. I have a booking took embedded in a code widget. The booking tool widget has 2 different codes for the languages /en and /de What do i do to ensure the booking tool changes language when the user selects the opposite language on the site? I have tried the following code but it doesn't show on the front end. Any help would be much appreciated:

    [trp_language language="en"]
    <div data-locale="en" data-location="684fc951aefd0ff7430b3cc2" data-source="SUP4YOU" id="heiuki-widget" data-redirect="https://sup4you.ch/"></div>
    <script type="module" src="https://booking-widget-bsy.vercel.app/index.js"></script>
    <link rel="stylesheet" href="https://booking-widget-bsy.vercel.app/index.css" />
    [/trp_language]

    [trp_language language="de"]
    <div data-locale="de" data-location="684fc951aefd0ff7430b3cc2" data-source="SUP4YOU" id="heiuki-widget" data-redirect="https://sup4you.ch/"></div>
    <script type="module" src="https://booking-widget-bsy.vercel.app/index.js"></script>
    <link rel="stylesheet" href="https://booking-widget-bsy.vercel.app/index.css" />
    [/trp_language]

    • This topic was modified 11 months, 1 week ago by gen0200.
    • This topic was modified 11 months, 1 week ago by gen0200.
    • This topic was modified 11 months, 1 week ago by gen0200.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gen0200

    (@gen0200)

    I’ve created a test page with the code module in: https://sup4you.ch/en/code-test/

    • This reply was modified 11 months, 1 week ago by gen0200.
    Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Thank you for reaching out to us!

    Would you be able to try with this shortcode?

    [trp_language language="en_GB"]
    <div data-locale="en" data-location="684fc951aefd0ff7430b3cc2" data-source="SUP4YOU" id="heiuki-widget" data-redirect="https://sup4you.ch/"></div>
    <script type="module" src="https://booking-widget-bsy.vercel.app/index.js"></script>
    <link rel="stylesheet" href="https://booking-widget-bsy.vercel.app/index.css" />
    [/trp_language]

    [trp_language language="de_DE"]
    <div data-locale="de" data-location="684fc951aefd0ff7430b3cc2" data-source="SUP4YOU" id="heiuki-widget" data-redirect="https://sup4you.ch/"></div>
    <script type="module" src="https://booking-widget-bsy.vercel.app/index.js"></script>
    <link rel="stylesheet" href="https://booking-widget-bsy.vercel.app/index.css" />
    [/trp_language]

    Try this and let me know!

    Kind Regards,

    Thread Starter gen0200

    (@gen0200)

    WOW Brilliant this works!!! Can’t believe it’s as simple as “en_GB”
    Can finally move on, appreciate the help!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘conditional shortcode not working’ is closed to new replies.