• Resolved essiej

    (@essiej)


    Hi,

    As we operate worldwide, we wanted to offer our donate pages in 2 languages. Based on this page we decided to install GiveWP and Weglot.

    We are now running into the issue that the translations are not working when you click on one of the packages and get redirected to the donation page of that package like for example this one: https://shop.flanders-recorder-quartet.be/en/donations/een-gesigneerde-cd/ as you can see in the url, the “en” language is added to the url string but the text displayed is still in Dutch…

    According to Weglot, this could be the solution for us but we can’t access the iframe page so we can’t add this: https://developers.weglot.com/javascript/translate-iframe

    Any suggestions here? We also reached out to Weglot to see if they can help us.

    Thanks in advance!

    • This topic was modified 3 years, 10 months ago by essiej. Reason: adding weglot info

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

Viewing 1 replies (of 1 total)
  • Plugin Support Rick Alday

    (@mrdaro)

    Hi @essiej,

    You can try this snippet to add javascript to the iframe content:

    function give_add_js_iframe() {
    
    	wp_add_inline_script( 'give-sequoia-template-js', '
    		Weglot.initialize({
        			api_key: "wg_xxxx",
        			hide_switcher: true // You already have a switcher in parent window
    		});
    	' );
    
    }
    add_action( 'wp_enqueue_scripts', 'give_add_js_iframe' );

    If you need assistance implementing custom PHP code on your website we have this guide:

    https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Please note that this code snippet is provided as an example of how you can extend GiveWP with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.

Viewing 1 replies (of 1 total)
  • The topic ‘Translation issue due to frame’ is closed to new replies.