假设您要将用户偏好的语言环境存储在数据库中,您将使用哪个值?
Assume you want to store the locale of user preference in database, which value you will use?
en_US 或 en-US
en_US or en-US
它们是两个标准,但您更喜欢将哪一个用作您自己的应用程序的一部分?
They are two standards, but which one you prefer to use as part of your own application?
更新:似乎很多网站都使用破折号而不是下划线,例如
Updated: Is seems many web sites use dash instead of underscore, e.g.
http://zh.wikipedia.org/zh-twhttp://www.google.com.hk/search?hl=zh-TW
我很确定-"是标准.如果您看到_"在某个地方,它可能是某些人想出的让它成为有效标识符的东西.
I'm pretty sure "-" is the standard. If you see "_" somewhere it's probably something some people came up with to make it a valid identifier.
为了正确起见,我个人会选择-".
Personally I'd go with "-", just to be correct.
http://en.wikipedia.org/wiki/IETF_language_tag
https://datatracker.ietf.org/doc/html/rfc5646
这篇关于en_US 或 en-US,您应该使用哪一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
上传进度侦听器未触发(Google 驱动器 API)Upload progress listener not fired (Google drive API)(上传进度侦听器未触发(Google 驱动器 API))
使用 Google Drive SDK 将文件保存在特定文件夹中Save file in specific folder with Google Drive SDK(使用 Google Drive SDK 将文件保存在特定文件夹中)
Google Drive Android API - 无效的 DriveId 和 Null ResourcGoogle Drive Android API - Invalid DriveId and Null ResourceId(Google Drive Android API - 无效的 DriveId 和 Null ResourceId)
谷歌驱动api服务账户查看上传文件到谷歌驱动使Google drive api services account view uploaded files to google drive using java(谷歌驱动api服务账户查看上传文件到谷歌驱动使用java
Google Drive 服务帐号返回 403 usageLimitsGoogle Drive service account returns 403 usageLimits(Google Drive 服务帐号返回 403 usageLimits)
com.google.api.client.json.jackson.JacksonFactory;Google Drcom.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example(com.google.api.client.json.jackson.JacksonFactory;Google Drive 示例