예제 #1
0
        internal CmsLanguagePackage()
        {
            _lang = new LanguagePackage();
            _lang.LoadFromXml(ResourceMap.GetXmlLangPackage());
            //todo: 加载自定义的配置,已经过时为了兼容以前数据
            LoadLocaleXml(Cms.PhysicPath + CmsVariables.SITE_CONF_PATH + "locale");

            //加载JSON格式语言
            LoadFromFile(Cms.PhysicPath + CmsVariables.FRAMEWORK_ASSETS_PATH + "locale/locale.db");
            // 加载系统内置的
            LoadLocaleXml(Cms.PhysicPath + CmsVariables.FRAMEWORK_PATH + "locale");
            // 加载用户通过界面添加的本地化资源
            LoadFromFile(Cms.PhysicPath + CmsVariables.SITE_LOCALE_PATH);


            /*
             * IDictionary<Languages,String> dict = new Dictionary<Languages,String>();
             *
             * //标签
             * dict.Add(Languages.zh_CN,"无标签");
             * dict.Add(Languages.zh_TW,"无标签");
             * dict.Add(Languages.En_US,"no tags");
             *
             * lang.Add(LanguagePackageKey.PAGE_NO_TAGS, dict);
             *
             * dict.Clear();
             * const string zh_cn_pack = "上一页|下一页|{0}|选择页码:{0}页";
             * const string zh_tw_pack = "上一頁|下一頁|{0}|選擇頁碼:{0}頁";
             * const string en_us_pack = "Previous|Next|{0}|Select Page:{0}";
             *
             *
             * dict.Add(Languages.zh_CN, "上一页");
             */
        }