0

Is there an easy way to embed the localized resources generated automatically by Visual Studio into the .exe? These resources are generated when we translate some form using Visual Studio Tools. These files are located inside a directory that contain the "code of the region", like pt-BR or es-CL. They are .dll. I've tried ILMerge and Fody, whitout success.

Resolved:

It was necessary to use "ILMerge" and implement a specific class to load the localized assembly from the ".exe". That's not an easy way, but works. Here's the solution: Single-assembly multi-language Windows Forms deployment (ILMerge and satellite assemblies / localization) - possible?

Community
  • 1
  • 1

1 Answers1

0

I have done this in the past using ILMerge 2.10.526. As in this question you have to merge one language at a time, otherwise it duplicates some languages. I have a resource class library ResLib, with Resources.resx, Resources.de.resx, and Resources.ro.resx.

integrate German into main dll => intermediate ResLib.de.dll

ILMerge.exe /lib:LIB /out:ResLib.de.dll ResLib.dll de\ResLib.resources. dll

integrate Romanian into intermediate in previous step => ResLib.de.ro.dll

ILMerge.exe /lib:LIB /out:ResLib.de.ro.dll ResLib.de.dll ro\ResLib.reso urces.dll

Output from ILSpy ILSpy merged language resources

There's a /target:winexe option too ...

Community
  • 1
  • 1
andrei.ciprian
  • 2,895
  • 1
  • 19
  • 29