Search code examples
winformsresourceslocalizationresgen

How to copyng Default Language resx to a language specific resx file to be able to Generate resource DLL?


Is there a way to copy the default resx file (default language) to an actual satellite assembly but automatically?

It appears that default language RESX files are not output as a DLL, only language specific ones.

It appears i can FORCE to creation of a satellite dll by using resgen, but this would mean writing a POSTBUILD event with lots of calls to resgen,

   resgen frmTest.resx MySatDLL.resources

Is there any other options.

Thanks in advance


Solution

  • You should be able to just copy the .resx file to a new file for the localized resources, using the properly formatted name.

    For example, if you wanted to localize ftmTest.resx to Japanese, copy it to a file named ftmTest.ja.resx. Once you add this file to your project and do a build, Visual Studio should automatically create the satellite assembly for you.

    Note that for localizing forms, you should use the Form designer and change the language there, rather than copying its .resx file. I believe that once you set a form as localize-able it changes the generated designer code. This approach would work if you have a .resx file of just strings, for example.