1

At this page the author wrote that the resources must be in special application folder (App_GlobalResources). OK, I put them in it. But in my project I use a tree of resource folders which reflects the tree of my views/models/etc. folders. So in each terminal folder of my tree branches I have a file with the same name (like "Strings" or any) as other resource files. This scheme seems easy to maintain resources corresponds to relative project file. All like this:

Application folders tree:

Views
-Account
--LogOn.cshtml
-Home
--Index.cshtml

Resources folders tree:

Resources
-Views
--Account
---LogOn
----Locals
-----Strings.resx // the same name
--Home
---Index
----Locals
-----Strings.resx // the same name

But this sameness within names leads to error of resources conflict in the App_GlobalResources folder. Even if I assign different namespaces for each resource file.

If I use my scheme out of App_GlobalResources, all works fine with resources but MvcSiteMapProvider.

So, can MvcSiteMapProvider use another resource folder except App_GlobalResources? Or how can I organize my resources to make them works with MvcSiteMapProvider properly but to avoid complication with huge resource amount.

user808128
  • 511
  • 1
  • 7
  • 24
  • No. I decided to use both schemes of resources - my and for MvcSiteMapProvider. I won't to reorganize my resource scheme, and this scheme looks more convenient than just to put all the files with locals into one folder (App_GlobalResources) and all the strings into one local file. – user808128 Aug 09 '12 at 11:18

1 Answers1

1

There are some advantages if you put your resource files outside the App_GlobalResources folder. Scott Allen wrote an excellent article about it:

http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx

You can use resources from another assembly within MvcSiteMapProvider, but you have to write your own resource provider, as explained here:

http://msdn.microsoft.com/en-us/library/aa905797.aspx

www.c-sharpcorner.com/uploadfile/prvn_131971/chapter-i-resources-and-localization/

Tomaz Tekavec
  • 764
  • 6
  • 22