en_UK是非法语言环境吗? [英] Is en_UK an illegal locale?

查看:139
本文介绍了en_UK是非法语言环境吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我一直将'en_UK'用作英式英语.今天,当与Zend Framework一起使用时,我遇到了一个错误,因为该语言环境未包含在较长的可识别语言环境列表中.

So far I had always used 'en_UK' for British English. Today I got an error when using it with Zend Framework because the locale is not included in the long list of recognized locales.

这里只是该列表的一小部分:

Here's just a short extract of that list:

'ee_GH' => true, 'ee_TG' => true, 'ee'    => true, 'el_CY' => true, 'el_GR' => true,
'el'    => true, 'en_AS' => true, 'en_AU' => true, 'en_BE' => true, 'en_BW' => true,
'en_BZ' => true, 'en_CA' => true, 'en_GB' => true, 'en_GU' => true, 'en_HK' => true,
'en_IE' => true, 'en_IN' => true, 'en_JM' => true, 'en_MH' => true, 'en_MP' => true,
'en_MT' => true, 'en_NA' => true, 'en_NZ' => true, 'en_PH' => true, 'en_PK' => true,
'en_SG' => true, 'en_TT' => true, 'en_UM' => true, 'en_US' => true, 'en_VI' => true,
'en_ZA' => true, 'en_ZW' => true, 'en'    => true, 'eo'    => true, 'es_AR' => true,
'es_BO' => true, 'es_CL' => true, 'es_CO' => true, 'es_CR' => true, 'es_DO' => true,

正如您所看到的,有各种各样的英语地区,还有一个条目"en_GB",我假设它代表英国……但是没有"en_UK".这仅仅是Zend Framework中的错误",还是还有其他原因?

As you can see, there are all kinds of territories with English language and there is also an entry 'en_GB' which I assume stands for Great Britain... but there is no 'en_UK'. Is that just a 'bug' in Zend Framework or is there another reason for that?

推荐答案

正确的国家/地区代码为en_GB.语言环境将ISO 3166-1用于国家/地区代码. 维基百科文章包括:

The correct country code is en_GB. Locales use ISO 3166-1 for country codes. The wikipedia writeup includes:

根据ISO 3166/MA选择代码,以反映 国名的重要,唯一组成部分,以便允许 国家名称和国家/地区代码之间的视觉关联".[7]为此 原因,国名的常见组成部分,例如共和国",王国", 通常不使用联合",联邦"或民主" 代码元素.结果,例如,英国 根据以下内容,正式分配了alpha-2代码GB(而非英国) 其正式名称为大不列颠及北朝鲜联合王国 爱尔兰"(尽管英国是应联合国的要求保留的 王国).

The codes are chosen, according to the ISO 3166/MA, "to reflect the significant, unique component of the country name in order to allow a visual association between country name and country code".[7] For this reason, common components of country names like "Republic", "Kingdom", "United", "Federal" or "Democratic" are normally not used for deriving the code elements. As a consequence, for example, the United Kingdom is officially assigned the alpha-2 code GB rather than UK, based on its official name "United Kingdom of Great Britain and Northern Ireland" (although UK is reserved on the request of the United Kingdom).

这篇关于en_UK是非法语言环境吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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