If this is for organizing production version, then you can
- use global resources vs. local resources (all files will be located in App_GlobalResources)
- compiling your resources so that they are deployed as DLLs rather than compiled at runtime. To do this you have to move your resources our of the standard App_GlobalResources. Compiled DLLs will be located in /bin/{culture}/ http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx
Member
2 Points
5 Posts
Change Resource Files Path
Jan 27, 2014 02:19 AM|a ch|LINK
Hi,
I have a set of resource files [Default.resx, Account.resx, Index.resx, Shared.resx...]
I need to have at least 5 language resource files for each one of those and it's gonna make more than 20 resource files.
I want to divide each culture in a separate folder [fa-IR, de-DE, ar-SA, ...]
But the resource cultures MUST be next to the default resource file (Default.resx and Default.fa-IR.resx).
How can I separate them?
Thanks...
All-Star
35149 Points
9075 Posts
Re: Change Resource Files Path
Jan 27, 2014 02:38 AM|smirnov|LINK
If this is for organizing production version, then you can
- use global resources vs. local resources (all files will be located in App_GlobalResources)
- compiling your resources so that they are deployed as DLLs rather than compiled at runtime. To do this you have to move your resources our of the standard App_GlobalResources. Compiled DLLs will be located in /bin/{culture}/ http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx
for "organizing" the project files you should probably use a custom ResourceProviderFactory http://msdn.microsoft.com/en-us/library/system.web.compilation.resourceproviderfactory.createlocalresourceprovider(v=vs.110).aspx
http://books.google.de/books?id=MWooIPGA4bkC&pg=PA678&lpg=PA678&dq=example+ResourceProviderFactory+path&source=bl&ots=rSpzyg82GB&sig=UDFoIjq62Wb1qB0WE_4YT4ipDz0&hl=de&sa=X&ei=kgvmUt7fF8eFtAaKrICIBQ&ved=0CGAQ6AEwBQ#v=onepage&q=example%20ResourceProviderFactory%20path&f=false