en_US或en-US,您应该使用哪一个? [英] en_US or en-US, which one should you use?

查看:1604
本文介绍了en_US或en-US,您应该使用哪一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设您要将用户首选项的区域设置存储在数据库中,您将使用哪个值?

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-tw
http://www.google.com.hk/search?hl=zh-TW

推荐答案

<等等,等等。伙计们,我很确定 - 是标准。如果你在某个地方看到_,那么很可能是某些人想出来使它成为有效的标识符。

Wait, wait, wait. Guys, 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

http://tools.ietf.org/html / rfc5646

这篇关于en_US或en-US,您应该使用哪一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆