如何禁用Google翻译对HTML类名的翻译

huangapple go评论140阅读模式
英文:

How to disable Google translate for HTML Class names

问题

I'm running through to ignoring html class name translation. I'm finding out the following solution

this text will not be translated

But I want to ignore my HTML Class name to be ignored instead of text.

Example:

Result:

In the following example I do not want to translate my dynamic classname.
Anyone help me to achieve this.

英文:

I'm running through to ignoring html class name translation. I'm finding out the following solution

<span class="notranslate">this text will not be translated</span>

But I want to ignore my HTML Class name to be ignored instead of text.

Example:
 <div data-bind="attr : { 'class':'notranslate '+headerLabel()}">
Result:
 <div class="notranslate classname">

In the following example I do not want to translate my dynamic classname.
Anyone help me to achieve this.

答案1

得分: 1

<html translate="no">

英文:

Add this line to your code for disable the whole google translate in your webpage.

&lt;html translate=&quot;no&quot;&gt;

huangapple
  • 本文由 发表于 2023年6月8日 15:28:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76429543.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定