本文介绍了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:

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

09-26 04:30