The localization model of Dragon MVC is enhanced to support none-compile resource update. For example, you can edit the .resx files in /Resources folder without restart your website. This can greatly help improve the continuous experience of your website. Moreover, the resources updated will be inserted into the cache just after you save the resx file.

The resource file name consists of module name, language code and extension:
<module name>.<languagecode>.resx
For example, User.zh-cn.resx

NOTE: By default, VS2008 will set any resx files as Embedded Resource, which requires compilation. It's suggested that you set these resx files to Content.

To visit the resources, you can use:
In View
<%=Html.Resource(<ModuleName>,<ResourceName>)%>
In Controller
this.Resource(<ModuleName>,<ResourceName>)

Last edited Nov 8, 2009 at 2:56 AM by tonyqus, version 2

Comments

No comments yet.