I am using qtranslate wordpress plugin to store blog content in multiple languages. Now I need to extract content from qtranslate tags.
$post_title = "<!--:en-->English text<!--:--><!--:it-->Italian text<!--:-->";
What would be the php code & regular expression to return text and language from this string?
Thanks a lot!
These are all brilliant examples. However, I recently discovered qTranslate has their own function available:
Which will grab the current language and fail over to the default.
Try something like:
Prints: