天天看点

Dnn文档中关于Localization错误

今天,为了在dnn中实现Localization,可让我费了不少功夫。如果在模块级别上显示Localization倒是没有什么难的。由于我们开发的那个模块功能比较复杂,所以将其子功能划分到user control中来实现。现在要做的是对user control实现localization。

参考dnn的文档,如下:

Normal DNN controls will inherit from PortalModuleBase, which has built-in support

for localization. If the module contains any extra user controls they should inherit from

UserControlBase to be able to use the same localization features. There is also a

PageBase class that can be used to provide localization to any extra aspx page the

module contains.

可是UserControlBase并不能帮助我们在自定义控件上实现Localization,经过查找,发现了一个ModuleUserControlBase,可以用来来实现Localization.

继续阅读