我刚刚设置了Magnific弹出窗口,但不幸的是,我不知道如何在我为AJAX弹出窗口创建的HTML文件中使用qTranslate的语言标记。
还是我应该在弹出窗口中嵌入一个wordpress页面(在这个页面中,qTranslate插件工作得很好)?
下面包含语言标记的HTML文件可以在id=9时看到“什么是手工艺啤酒?”被点击了。当选择英语时,"中文“应该是不可见的。
这是我的第一篇文章,如果你需要更多的信息,请告诉我。
<<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="custom-content" class="white-popup-block" style="max-width:600px; margin: 20px auto;">
<h3>What is Craft Beer?</h3>
<style>
#custom-content img {max-width: 100%;margin-bottom: 10px;}
</style>
<p>Craft Beer is a specialty product </p>
<p><!--:zh-->中文<!--:--></p>
<img src="http://chinasonoma.com/wp-content/uploads/2013/06/sampler.jpg"/>
</div>
</body>
</html>发布于 2013-08-08 20:05:49
我认为答案很简单。
有两种可能性:
<p><?php apply_filters('the_content','<!--:zh-- >中文<!--:-->'); ?> </p><p><?php if(qtrans_getLanguage()=="zh") { echo "中文"; } ?></p>希望这能有所帮助。
https://stackoverflow.com/questions/18129630
复制相似问题