kentico应用资源字符串存放在哪个文件夹
In which folder of kentico application resource strings are stored
In which folder these strings are stored in kentico
这取决于您的设置。物理文件夹是 CMSResources,但检查 Working with resource strings 。系统在加载资源字符串时使用优先级。默认规则是:
- 数据库(本地化应用程序)- 最高优先级
- 站点特定的 resx 文件
- 自定义模块的resx文件
- custom.resx
- cms.resx
所以假设您的资源字符串是在数据库中定义的(并且它具有最高优先级),系统会从那里获取它并忽略 cms.resx 中的同名资源字符串。
如果要获取存储在数据库中的资源字符串,可以执行以下查询:
SELECT stringKey, CultureCode, TranslationText
FROM CMS_ResourceString (NOLOCK)
JOIN CMS_ResourceTranslation (NOLOCK) on TranslationStringId = stringId
JOIN CMS_Culture on TranslationCultureID = CultureID
它们存储在数据库本身的两个表中:CMS_ResourceString
和 CMS_ResourceTranslation
。您可以在文档的 Working with resource strings 页面上找到更多信息,如果您需要考虑 resx
个文件,这也会有所帮助。
正如您从文档中看到的,DB 是默认值,DB 获得最高优先级。
In which folder these strings are stored in kentico
这取决于您的设置。物理文件夹是 CMSResources,但检查 Working with resource strings 。系统在加载资源字符串时使用优先级。默认规则是:
- 数据库(本地化应用程序)- 最高优先级
- 站点特定的 resx 文件
- 自定义模块的resx文件
- custom.resx
- cms.resx
所以假设您的资源字符串是在数据库中定义的(并且它具有最高优先级),系统会从那里获取它并忽略 cms.resx 中的同名资源字符串。
如果要获取存储在数据库中的资源字符串,可以执行以下查询:
SELECT stringKey, CultureCode, TranslationText
FROM CMS_ResourceString (NOLOCK)
JOIN CMS_ResourceTranslation (NOLOCK) on TranslationStringId = stringId
JOIN CMS_Culture on TranslationCultureID = CultureID
它们存储在数据库本身的两个表中:CMS_ResourceString
和 CMS_ResourceTranslation
。您可以在文档的 Working with resource strings 页面上找到更多信息,如果您需要考虑 resx
个文件,这也会有所帮助。
正如您从文档中看到的,DB 是默认值,DB 获得最高优先级。