谷歌翻译破坏了 Firefox 中的样式表
我正在帮助客户建立一个电子商务网站(在 eBay 的 ProStores 上运行)。
问题在于,当使用 Google 翻译小部件翻译页面时,网站的基本样式表被破坏(被禁用)。这只发生在 Firefox 中。 Chrome、IE(6-9)、Opera 和 Safari 都可以。
在我们最近做出一些更改之前,FF 中的翻译就可以工作:主要是图形化,对样式表进行了一些添加。我不得不小心翼翼地使用他们的模板,这些模板是用表格、过时的代码等构建的,所以当我试图解决这个问题时,我不知所措。
以下是该网站的链接:http://www.myfantasticbags.com
(在FF中打开并使用谷歌翻译在标题区域查看问题)
提前致谢!
I am helping a client with an eCommerce site (runs on ProStores from eBay).
The issue is that the site's base stylesheet is breaking (being disabled) when the page is translated with the Google Translate widget. This only happens in Firefox. Chrome, IE(6-9), Opera and Safari are all fine.
Translate in FF was working prior to some changes we made recently: mostly graphical, some additions to the stylesheet. I had to tip-toe around their templates which were built with tables, outdated code etc. so I am overwhelmed when trying to troubleshoot this.
Here is a link to the site: http://www.myfantasticbags.com
(open in FF and use google translate in the header area to see the issue)
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我也遇到了同样的问题,对此感到非常沮丧。
我遇到的问题是它正在翻译我网站的字体调整器 - 从“大”到“大”等,这会抛弃字体调整大小元素和整个网站。
尝试将 class="notranslate" 添加到您认为可能要翻译的任何元素并抛弃样式表。
希望这有帮助!
科里
I had the same problem and much frustration with this.
The problem I was having was that it was translating my website's font-resizers - From 'large' to 'grande' etc. which was throwing off the font-resize element and entire site.
Try adding a class="notranslate" to any elements you think may be translating and throwing off your stylesheet.
Hope this helps!
Korey
将
class="skiptranslate"
添加到 head 标签。Add
class="skiptranslate"
to the head tag.如果您还有指向打印预览样式表的链接,以便您的访问者可以查看页面的打印方式,请尝试以下操作:将指向外部样式表的链接放入 class="notranslate" 的 div 中,不仅可以修复翻译Firefox 以及在所有浏览器中的打印预览和默认 CSS 之间来回翻转时也是如此。我知道 head 标签中的 div 是不典型的,但我认为这不会产生任何问题。
If you also have a link to a print preview style sheet, so your visitors can see how pages will print, try this: Putting the link to your external stylesheet inside a div with class="notranslate", may not only fix the translation in Firefox but also when flipping back and forth between your print preview and default CSS in all browsers. I know that divs in the head tags are atypical, but I don't see any problem arise from that.