Pregunta

we have a complex application here which is written in MFC and C# and running in mixed-mode. We're now trying to set up a multi-lingual version of this application. So I created English resource files (in the .NET part) for every existing resource file and translated all necessary strings. E. g.: MyResource.resx and MyResource.en.resx. Original language is German.
Now if I start the solution containing only the .NET-Projects with the Thread.CurrentThread.CurrentUICulture set to 'en-US' all the dialogs and texts appear in English as expected. The MFC part (the compiled code in the .exe file) is translated with a tool called Lingobit which replaces the strings in that .exe file and it works fine. So far, so good.

But when it comes to start the full mixed-mode application all the English resource files of the .NET part are ignored and it falls back to the German ones.

I additionally tried to use Lingobit to translate the .NET-DLLs. Lingobit creates a separate mylib.resource.dll of my original mylib.dll which seems to be ignored, too.

I'm running out of ideas here how to create an English version of this application. Any suggestion how to make my mixed-mode application use the English resource files?

Thanks in advance.

¿Fue útil?

Solución

The solution itself was quite simple, but it took me a while to find it. If you compile the .Net project Visual Studio creates a "en"-Folder in your output folder (e. g.: bin/Debug/). This folder is not created with the compilation of the mixed mode version, so just copy it from your .Net output folder to your mixed mode output folder. In addition I'll create a little script to copy it to the needed location after the build.

Have a good one everybody.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top