css - 使用谷歌翻译后更改字体大小

标签 css wordpress translation

我正在使用 WordPress主题,我已经安装了 Google翻译插件。

翻译语言后我遇到了问题。从英文改成任何语言后,字体完全变大了。我已经研究并发现我可以使用 :lang pseudo标签,但是当我用 Firebug 检查时 html我页面的类别仍然是“en-US”,:lang pseudo 也是如此标签工作?

如果是这样,当我将其切换为法语时,我如何知道该调用什么?我已经对此进行了几个小时的研究,但尚未找到解决方案。这是网站的链接,如果有任何帮助,我们将不胜感激

http://rightbrainmediaanddesign.com/wordpress_jinja/

///美国东部时间凌晨 1:09 更新/// 我发现翻译后它把我的文字包装在 <font> 中标签,所以如果我在 css 中调用它,它允许我对任何翻译进行通用更改,但是我仍然无法针对特定语言。这是我所做的。 #primary-menu font { font-size: 11px !important; }现在成功了,但正如我所说,它对任何翻译都是通用的,即从英语到任何语言。现在的挑战是能够仅更改法语或仅更改西类牙语。

最佳答案

(在问题编辑中回答。转换为社区维基答案。参见 What is the appropriate action when the answer to a question is added to the question itself?)

OP 写道:

Okay, ISSUE SOLVED!! I downloaded a different wordpress plugin here it is.

http://transposh.org/

Now this plugin ties into the Google Translate API, however unlike the google plugin this one actually changes the lang="" in the <html> section above the header. So, in your css, to reference a specific language in the css it would look like this(for those that dont know) html:lang(es) That would be for spanish, to reference a specific div it would look like html:lang(es) #primary-menu {}. To locate your language abbreviation, just inspect your document and you will see it located at the very top of the html in this case it says lang="es". I sure hope this helps someone out there, because it just did wonders for me.

关于css - 使用谷歌翻译后更改字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16227936/

相关文章:

javascript - 悬停价格标签时的图像映射

javascript - 联系表格 7 AJAX 回调

php - 翻译 Silex 路线

php - 为什么我的自定义密码重置链接被视为无效?

c# - 在 asp.net mvc4 中将 Url 翻译为另一种语言以用于 SEO 目的

browser - 如何指定网页的语言,以便 Google Chrome 不提供翻译功能

css - 如何为 grunt-lesslint 设置映射

css - 如何使用 CSS 使正文内容在页面上居中

css - 这是 Chrome 和 IE 中的文本缩进错误,还是我遗漏了什么?

javascript - Google Grid Gallery Safari 模态滚动