I'm using the Qtranslate plugin for my site. It's a pretty cool plugin and works great to a degree. I'm having a problem though when users add links to internal content in the WYSIWYG editor in that the link will just be outputted in one language. I would like to insert some php automatically to all links to internal content created in the WYSIWYG editor of my site. I want
<?php echo qtrans_getLanguage(); ?> to be added to every internal link.
For example if the following is done in WP:
I want it to be outputted as this:
<a href="/<?php echo qtrans_getLanguage(); ?>/london/">London</a>
This way any links inserted in content using the WYSIWYG editor will automatically forward to the right language.
There's a further complication that means I don't want external links to have the php added. So if a link looks like this:
<a href="http://www.google.com/">Google</a>I want it to stay like this.
Any idea how this could be done? I couldn't find any other posts that were addressing such an issue.