Translate script type text/javascript
-
Hello,
I am using the qtranslate x plugin on my website and everything works fine.
But now I am asking me how can I translate a text which is in the label.This is my code:
<?php add_action( 'wp_footer', 'add_tos' ); function add_tos() { ?> <script type="text/javascript"> jQuery(function($){ if($('.mp_cart_shipping').length) { var html = '<tr><td colspan="2"><label><input type="checkbox" id="tos" /><strong>I agree with the <a href="/en/general-terms-and-conditions/">terms and conditions</strong></a></label></td></tr>'; $('.mp_cart_shipping tbody').append(html); $('#mp_shipping_submit').click(function(e){ if(!$('#tos').is(':checked')) { e.preventDefault(); alert("<strong>Yes, I have read and agree with the terms and conditions</strong>"); return false; } return true; }); } }); </script> <?php }
I want to translate the following part: I agree with the terms and conditions and the last one under alert Yes, I have read and agree with the terms and conditions”. I have make the parts strong, so you can better see what I mean ??
Please, could you give me a advice,
thanks a lot,
regards,
Edina
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Translate script type text/javascript’ is closed to new replies.