gpt4 book ai didi

facebook - 任何语言(国际化)的“喜欢”按钮的最大宽度?

转载 作者:行者123 更新时间:2023-12-03 22:08:24 25 4
gpt4 key购买 nike

我在一个国际分布非常广的网站上工作,需要了解任何可用语言中“赞”按钮的最大宽度。

到目前为止,我能找到的最大的“赞”按钮是俄语版的 - http://cl.ly/Jmeb .是否有包含每种可用语言的“赞”按钮大小的完整规范列表?

最佳答案

嗯,设计网站最稳健的方法是不要严格限制“赞”按钮的大小。 Facebook Developers topic Internationalization说,

Avoid Layouts Relying on Precise Sizing

Try not to use layouts that depend on the precise onscreen sizes of pieces of text in the original language. For any piece of text, in some languages it is likely to be shorter and in some it will be longer (sometimes significantly so in either direction.) If you have sized your user interface elements such that your text just barely fits, your application will probably not work well in a language with longer words.

同样,Facebook Developers topic Like Button说,

You may need to adjust the width of the Like button to accommodate different languages.

您在俄语中发现了一个 110 像素宽的“赞”按钮。您的布局可以使用 1.5 倍宽的按钮吗? 2倍宽? 5倍宽?那么你可能是安全的。

但是浏览器在显示您的页面时会从 Facebook 检索他们的 Like 按钮图像,对吗?因此,即使我们今天可以为您提供每种可用语言的“赞”按钮大小的完整列表,明天 Facebook 可能会添加另一种具有更长“赞”按钮的语言。

也就是说,Facebook 确实提供了 getting the Like button 的代码使用您选择的任何语言(请参阅常见问题解答:如何以不同语言显示“赞”按钮?): src="http://www.facebook.com/plugins/like.php?locale=fr_FR&...

Facebook 还发布了一个 XML 文件列表 the locales that Facebook supports .通过一些 Grep 搜索/替换,我们可以生成一个 HTML 页面,该页面在今天列出的所有 76 个语言环境中显示“赞”按钮。查看这些按钮的宽度,我们发现 Like 按钮的爱尔兰本地化版本是目前最宽的,有 127 像素。 (在我的系统上,马拉雅拉姆语中的“赞”按钮显示为 169 像素,有点宽,但那是因为我没有安装马拉雅拉姆语字体,所以按钮显示缺少字形框。)

因此,在目前支持的语言中,Like 按钮的最大宽度看起来像是 169 像素宽。但是,编码到这种宽度并不是 Facebook 或良好的国际化设计所推荐的。相反,使您的布局灵活,并能够在某些区域设置中处理更宽的“赞”按钮。

关于facebook - 任何语言(国际化)的“喜欢”按钮的最大宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12636337/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com