VisualStudio: should I use a separate Resource-Files-Project for resource files?
We are starting the development of a new asp.net mvc 5 application that needs to be multilingual.
I found a very good tutorial on how to do this. The only thing I'm interested in about this tutorial is that the author suggests creating a separate project inside the resource solution.
Now my question is, is this recommended?
I usually create a folder called Resources
inside my MVC project. Although, if you want to reference your resources from other projects, you can create them inside a separate project.
Then I subfolder based on the names of my controllers and change the "Custom Tool" property to "PublicResXFileCodeGenerator".
When I use resource strings in my views it looks like this:
<title>@Resources.Home.Index.PageTitle</title>
Personally, I prefer to use a folder over a project as it forces me not to generate UI strings in my application layers and forces me to find better ways to solve problems where I can end up generating strings in my business logic that might end up in user interface.
We have resource files in projects where they are most relevant.
We have a component that handles translation of resources at different levels (also for Winforms and WPF ...) and we group resource files by functional value,
business level messages in a project for the bussiness level, a
project for general translations used by our standard code.
The .NET ResourceManager can handle one resource file, so our manager keeps a list of ResourceManagers.
At runtime, you just try them all (or work with logical category names to speed up searches) ...