0

So here is the case I have for satellite assemblies(Winforms):

  1. I have a project by project name "ABC" .
  2. Under this project I have a resource file where all the text for labels and messages have been defined.
  3. Say I create another new project with same name "ABC".
  4. In this 2nd project I want to define the resource files for all other languages having the text for labels and messages.
  5. So to summarize I want to use the duplicate name project ABC resource files into the primary project ABC for localization. The reason why I want to do this is if my clients wants it in another language I should not have to ship the whole library. Just the resource folder.

Thanks once again for your help.

  • You don't need multiple projects. You can have multiple resource files for different languages, and choose which one to ship, or even switch between them in runtime. – funatparties Mar 02 '22 at 22:48
  • Thanks. I want to understand if we have the capability at all to do that? – Hrishikesh Shahapurkar Mar 03 '22 at 15:15
  • Yes, here's an example https://stackoverflow.com/questions/1142802/how-to-use-localization-in-c-sharp. It's also possible to switch in runtime, however this complicates things and if it's not absolutely necessary it should be avoided. The recommended approach is to load 1 resx file on startup and use it across the lifetime of the app. – funatparties Mar 03 '22 at 16:49
  • Hey, I tried the batch file approach, still cant seem to get it working below is the code(no error generated): resgen.exe /compile Strings.es-ES.resx,ProjectName.Strings.es-ES.resources Al.exe /t:lib /embed:ProjectName.Strings.es-ES.resources /culture:"es-ES" /out:"ProjectName.resources.dll" del ProjectName.Strings.es-ES.resources pause – Hrishikesh Shahapurkar Mar 07 '22 at 17:06
  • I have never used that approach, so I don't know what could be wrong. One thing that could be wrong is "Be sure to keep the original namespace in the file names (here "WpfRibbonApplication1")" – funatparties Mar 07 '22 at 17:34
  • I tried with the namespace and it did not yield any result. But this is the ideal path I would like to take, i.e. have my clients run a batch file with a resx file of their own with instructions of the file name having the namespace and embedding it to the assembly and then the application then applies the culture. Thank you so much for you help and advice, I truly appreciate it. – Hrishikesh Shahapurkar Mar 08 '22 at 18:48

0 Answers0