Javascript JSF2和jquery lang js插件不翻译IE9中的h:outputLabel
我正在使用插件来翻译我的页面。在IE8中一切都很好,但是在IE9中,Javascript JSF2和jquery lang js插件不翻译IE9中的h:outputLabel,javascript,jquery,jsf,jquery-plugins,jsf-2,Javascript,Jquery,Jsf,Jquery Plugins,Jsf 2,我正在使用插件来翻译我的页面。在IE8中一切都很好,但是在IE9中,h:outputLabel的标签没有被翻译。。为什么会这样?我该如何解决这个问题 我的代码示例: <h:body> <script type="text/javascript"> $().ready(function () { window.lang = new jquery_lang_js(); window.lang.run(); window.lang.change(language); $
h:outputLabel
的标签没有被翻译。。为什么会这样?我该如何解决这个问题
我的代码示例:
<h:body>
<script type="text/javascript">
$().ready(function () {
window.lang = new jquery_lang_js();
window.lang.run();
window.lang.change(language);
$('*').each(function()
{
var attr = $(this).attr('lang');
if (typeof attr !== 'undefined' && attr !== false)
{
$(this).attr("lang", language);
}
});
});
</script>
<h:form id="testForm" dir="#{bean.dir}" >
<h:panelGrid id="testTable" columns="2" dir="#{bean.dir}" rowClasses="rowTop,rowBottom" columnClasses="column1,column2">
<h:outputLabel value="User Code:" for="userCode" lang="en"/>
<h:outputLabel/>
<h:inputText id="userCode" value="#{bean.userCode}"/>
<h:message id="userCodeMSG" for="userCode" showDetail="false" showSummary="true" styleClass="message"/>
</h:panelGrid>
</h:form>
</h:body>
$().ready(函数(){
window.lang=newjquery_lang_js();
window.lang.run();
window.lang.change(语言);
$('*')。每个(函数()
{
var attr=$(this.attr('lang');
if(类型属性!='undefined'&&attr!==false)
{
$(this.attr(“lang”,语言);
}
});
});
请帮忙!!
提前谢谢。我不知道是否能帮上忙,但我有一些想法:
放在中,以强制IE9像IE8一样呈现页面<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>