Typesafe resource files based on brand as well as culture (in MVC)
I have some resource files used within MVC views and also in data annotations validation attributes.
I can create renamed copies of these for different cultures and they are automatically picked up as expected but I also have a requirement to change the resource file based on brand as well. Brand is a config value.
Is this possible开发者_如何学编程 (keeping the type safety)?
I ended up creating custom cultures which works really well.
See http://msdn.microsoft.com/en-us/library/system.globalization.cultureandregioninfobuilder.cultureandregioninfobuilder.aspx
精彩评论