David Thielen
David Thielen

Reputation: 32976

How do I place resources inside the .EXE?

The "standard" way to have language specific resources in .NET is to have a folder under the .EXE for each language and then in the folder have a file filename.resources.dll. This leads to a lot of folders all over the place under every directory we have an .EXE in that has been localized.

Is there a way to place these resources inside the .EXE?

thanks - dave

Upvotes: 0

Views: 154

Answers (2)

Clafou
Clafou

Reputation: 15400

I assume you're not happy with your app being monolingual (in which case you can embed resources in your assembly).

The localization model provided by the .NET Framework depends on the file structure you describe. So to answer your question, you can't. Of course you can keep all assemblies in one folder, which means you'll only have one language subfolder per language.

You could try and build a custom Resource Manager and use resources embedded together in your assemblies, but I think it would complicate your process a lot (for example you'd have to rebuild and redeploy everything if you add a language or change one translation, and managing translations would be a real pain if everything is merged together).

Upvotes: 1

Gabe
Gabe

Reputation: 50513

You can add resources from within the project properties. Just right click on the project and choose properties. Then select the resources options and add the resources that you need to be embedded into the assembly.

MSDN for more...

Upvotes: 0

Related Questions