1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
//此处省略N行代码 'service_manager' => array( 'allow_override' => true, 'factories' => array( 'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory' ), 'aliases' => array( 'translator' => 'MvcTranslator' ) ), 'translator' => array( 'locale' => 'en_US', 'translation_file_patterns' => array( array( 'type' => 'gettext', 'base_dir' => __DIR__ . '/../language', 'pattern' => '%s.mo' ) ), // 由于一种语言,有多种表现形式,日语可以是ja,ja-jp,简单中文zh,zh-CN,这里归纳一下 // abbr,与框架Library同级resource下语言目录名称,看起来像缩写 // include,语言包含的形式 // 此处我的网站使用三种语言:zh_CN, en_US, zh_TW,有更多语言往后面加 'correspond' => array( 'zh_CN' => array( 'abbr' => 'zh', 'include' => array( 'zh', 'zh-CN' ) ), 'en_US' => array( 'abbr' => 'en', 'include' => array( 'en', 'en-US' ) ), 'zh_TW' => array( 'abbr' => 'zh_TW', 'include' => array( 'zh-TW' ) ) ) ), //此处省略N行代码 |