|
来源:http://trac.seagullproject.org/wiki/Modules/Cms/i18n CMS国际化概述Seagull CMS模块可以根据你选择你语言生成内容以供显示。内容可以是
控制显示语言
如果URL中已经有了module/action参数,你可像下面这样调用某种语言: http://example.com/cms/contentview/lang/zh-TW/ 也可像下面这样使用: http://example.com?lang=zh-TW SGL_Translation3SGL_Translation3库负责:
使用范例
// sets default language for framework, checks for lang param used to set user lang
$trans = SGL_Translation3::singleton('array');
try {
$trans->loadDefaultDictionaries();
} catch (Exception $e) {
SGL::raiseError($e->getMessage(), SGL_ERROR_NOFILE);
}
|