【发布时间】:2011-12-27 06:38:25
【问题描述】:
我真的需要一些帮助。
我有一个功能可以提取[internet]blablabla[/internet] 由preg_match_all 完成的短代码之间的内容
function get_content($my_post) {
$post_id = $my_post; //$_GET["p"];
$queried_post = get_post($post_id);
$title = $queried_post->post_title;
preg_match_all('#\[internet\](.+)\[\/internet\]#', $queried_post->post_content, $matches);
//var_dump($matches[1][0]);
if ( is_single( ) ) {
echo '<br><br><h1>'.$matches[1][0].'</h1>';
echo '<br><br><a href="http://moldcell.info/ts/?p='.$my_post.'&'.$matches[1][0].'">get url</a>';
}
}
我的网站支持 3 种语言(英语、罗马尼亚语、俄语)。当我放置qtranslate的条件标签时,它没有翻译,但它给了我默认语言的值。
如何翻译?
提前谢谢你。
P.S.:我已经在 qtranslate 支持论坛上发布了这个,但没有回复。也许 SO 的人可以帮助我。
【问题讨论】:
标签: preg-match-all shortcode qtranslate