Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Anghel Emanuel

    (@anghelemanuel99)

    Hello there,

    Thank you for reaching us!

    It won’t work to use the shortcode into HTML.

    What you can do is to insert that code in the back-end using a code block and then you can isolate it using the Conditional Shortcode.

    Try this and let me know!

    Kind Regards,

    Thread Starter mikehillcreative

    (@mikehillcreative)

    Hello Anghel,

    Can you please tell me what you mean by “code block”?

    And then what exactly to I put in that code block?:

    Should I put both of my form scripts, wrapped in your short codes, into that code block?

    Then, on the page where I want the forms to load, what conditional shortcode do I put in my page builder module?

    Thanks,

    Michael

    Thread Starter mikehillcreative

    (@mikehillcreative)

    Hello Anghel,

    Can you please tell me what you mean by “code block”?

    And then what exactly to I put in that code block?:

    Should I put both of my form scripts, wrapped in your short codes, into that code block?

    Then, on the page where I want the forms to load, what conditional shortcode do I put in my page builder module?

    Thanks,

    Michael

    Plugin Support Alex

    (@alexcozmoslabs)

    @mikehillcreative

    The shortcode needs to be used in a shortcode block, text editor, or as in the example with Gutenberg block in our documentation, but not directly in HTML:?https://translatepress.com/docs/restrict-by-language/translation-shortcode/.
    So basically, you need to include that code into a widget/code-block, then isolate that block further with our shortcode.

    Also, please notice that You can use our Conditional Shortcode Based On Language to if your website is built with Elementor, you can restrict the modules based on language using our Restrict by Language integration.
    Moreover, we have similar integrations with Oxygen Builder, and WP Bakery.

    Best Regards,

    Thread Starter mikehillcreative

    (@mikehillcreative)

    @alexcozmoslabs

    OKay, I finally got some results, thanks.

    In Beaver Builder:
    I placed a text module in its own row, added [trp_language language=”en_US”] above the content I want to show/hide.

    I placed my english content in its own row.

    Below that, I placed a second text module in its own row with [/trp_language]

    I repeated this process for my Portuguese content.

    Beaver builder has a conditional logic area in each container. I am wondering if there is a way to control this from there. (Shortcode result, or Cookie, or URL variable) ?

    Plugin Support Alex

    (@alexcozmoslabs)

    Glad to know it worked.

    There is no integration between Beaver and our conditional approach. Maybe we will try to come back to this idea in the future if we notice a major interest from our users regarding such a feature, but for the moment, the only solution is to use the conditional shortcode.

    However at the moment our current restrict-by-language integration is available as integration for Elementor, so you can restrict the modules based on language using our Restrict by Language integration, https://translatepress.com/docs/restrict-by-language/elementor-integration/, Oxygen Builder, https://translatepress.com/docs/restrict-by-language/oxygen-builder-integration/, and WP Bakery, https://translatepress.com/docs/restrict-by-language/wpbackery-integration/.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do switch scripts based on language’ is closed to new replies.