为 Google 页面翻译指定 HTML DOM 个节点(与 class=notranslate 相反)
Specify HTML DOM nodes for Google page translation (opposite of class=notranslate)
我知道您可以使用 class="notranslate"
告诉 google translate 不要翻译某些部分,但是您能告诉 google 只翻译特定部分而不翻译其余部分吗?
如果没有,还有其他选择吗?
使用属性translate=""
,并在正文中指定。然后在里面,指定要翻译的节点。例如:
<body translate="no">
<p translate="yes">Will be translated</p>
<p>Will not be translated</p>
</body>
<body class="notranslate">
<p class="translate">Will be translated</p>
<p>Will not be translated</p>
</body>
对我有用
我知道您可以使用 class="notranslate"
告诉 google translate 不要翻译某些部分,但是您能告诉 google 只翻译特定部分而不翻译其余部分吗?
如果没有,还有其他选择吗?
使用属性translate=""
,并在正文中指定。然后在里面,指定要翻译的节点。例如:
<body translate="no">
<p translate="yes">Will be translated</p>
<p>Will not be translated</p>
</body>
<body class="notranslate">
<p class="translate">Will be translated</p>
<p>Will not be translated</p>
</body>
对我有用