Reputation: 16569
We have a website project that is being localized to 30+ languages.
The project is split into PLL, BLL & DAL.
We have over a hundred .resx files located in various different folders in the base language (English).
We use a separate system for localization which spits out all the language files in the correct format/directory automatically.
Once finished there will be thousands of files to import into the visual studio project!
This will become a nightmare to manage :(
Is there any way to compile the localized files separately into Satellite Assemblies and then copy them into the project later?
I just want to work with the English files only in the main VS project and not see all the localized files.
Upvotes: 1
Views: 1122
Reputation: 16569
You can create another project that houses only the localized resource files - build these into Satellite Assemblies and then copy them into your main project.
For example:
Create a new project in your existing solution eg: myApp.Localized
Then change the assembly name to match the name of the main application (myApp) and change the default namespace (C#) or the root namespace (Visual Basic) to match the default or root namespace of the main application (myApp).
Now when you build the myApp.Localized project it will create the satellite assemblies for each language-culture in the bin folder.
A Satellite Assembly for each language will be located in a subfolder within the bin.
Copy each language folder into your main application bin when you are ready to deploy the project. (the assemblies must reside inside the named language folders)
Repeat the above for each project (DAL, BLL, PLL)
This allows you to work with the Neutral language in your main project and keep all other languages in a separate project. Thus reducing complexity, build time and clutter in the project!
You can find more information at:
http://visualstudiomagazine.com/articles/2005/01/01/make-the-best-of-net-resource-files.aspx
Upvotes: 1