问题在于,当我选择一种语言时,我会打开打开的乐队。这是我的代码:
<! - Begin TranslateThis Button ->
<div id="translate-this">
<a href="http://translateth.is/" class="translate-this-button">
<img src = ".. / modules / traduireshop / images / FR. jpg "alt =" "style =" border: 0 "/>
</ a>
</ div>
<script type="text/javascript" src="http://www.google.com/jsapi"> </ script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js"> </ script>
<script type="text/javascript">
// javascript - see below
</ script>
<! - End TranslateThis Button ->
我的网站地址为:http://www.lecoindesvelos.com
TranslateThis ({
undoText: 'Undo', '
panelText 'Translate Into:'
moreText: More Languages ??'36 "'
busyText: 'Translating page ...'
CancelText: 'cancel',
ddLangs: [
'fr',
'en',
'of'
'it'
'es',
],
noBtn: true
});
你能告诉我哪里有问题。
我想更多这个乐队。
答案 0 :(得分:2)
您的对象的语法不正确,请尝试以下方法:
TranslateThis({
undoText: 'Undo',
panelText: 'Translate Into:',
moreText: "More Languages '36'",
busyText: 'Translating page ...',
CancelText: 'cancel',
ddLangs: [
'fr',
'en',
'of',
'it',
'es'
],
noBtn: true
});
此外,您正在错误地关闭一些html标签:
</ a>
</ div>
应该是:
</a>
</div>
最后,这些HTML评论缺少一些破折号:
<! - Begin TranslateThis Button ->
试试这个:
<!-- Begin TranslateThis Button -->
答案 1 :(得分:0)
您的对象创建中有无与伦比的引号和缺少的逗号。正确的代码应该是:
<script type="text/javascript">
TranslateThis ({
undoText: 'Undo', //removed a quote
panelText: 'Translate Into:', //added a colon after key and added comma
moreText: 'More Languages (36)', //removed unmatched quote, added comma
busyText: 'Translating page ...', //added comma
CancelText: 'cancel',
ddLangs: [
'fr',
'en',
'of', //added comma
'it', //added comma
'es' //removed comma - it's the end of the array, so no need
],
noBtn: true
});
</script>
答案 2 :(得分:0)
似乎“翻译此”按钮的服务http://translateth.is已关闭。在该网站上运行的演示也不起作用。
Firebug显示您的网站尝试访问未响应的http://85.17.190.170:9013/socket.io/1/?t=1356094015380
。
此外,您的问题不完整:
问题在于,当我选择一种语言时,我会对乐队进行评论 打开。
选择语言时会发生什么?你说你是“Google开放的乐队”;你的意思是你对打开的乐队进行谷歌搜索? (我猜不是,我只是在这里猜测)。 或者,您是否希望看到列出更多语言?