Hi everyone,
How can I write some text, let's say <p>this is english</p> and <p>this is spanish</p>in the template file and make it work like the content I have posted from the WP dashboard with qTranslate?
Thanks!
Hi everyone,
How can I write some text, let's say <p>this is english</p> and <p>this is spanish</p>in the template file and make it work like the content I have posted from the WP dashboard with qTranslate?
Thanks!
I solved it guys.
Just surround it with this:
<?php if(qtrans_getLanguage() == "es") : ?>
<h1>This is Spanish</h1>
<?php endif ?>
<?php if(qtrans_getLanguage() == "en") : ?>
<h1>This is English</h1>
<?php endif ?>
And you're good to go!
this made my day. thanks for sharing!
this should do it as well:
<?php _e("<!--:en-->english text<!--:--><!--:es-->spanish text<!--:-->"); ?>
You must log in to post.