Our application UI is developed using MFC in Visual C++. To support
different languages, do we have to maintain seperate resource file for each
language? Can we store the dialog strings like the text in a label, text in
a button in a seperate text file and somehow load in it? So that we can send
the text file to translation company and have it translated.
We looked at storing all the text in the dialog to the string table of
resource file, then set the text when the InitDilaog() method is called, by
loading it from the string table, but that seemed to be a lot of work
becuase we have more than 100 dialogs to do this.
In other UI i have used like Motif you can specify in the resource file
like,
Dialog1.Ok = "OK"
Dialog1.Cancel = "Cancel"
What would be the best approach using MFC and the simplest way to do this?
Thanks,
David
> So that we can send
> the text file to translation company and have it translated.
Any localization company should be able to deal with RC files.
Don't look for translation company.
> We looked at storing all the text in the dialog to the string table of
> resource file, then set the text when the InitDilaog() method is called, by
> loading it from the string table, but that seemed to be a lot of work
> becuase we have more than 100 dialogs to do this.
Bad idea.
You need resizing, changing fonts, maybe alignment, etc.
Also, translating in RC gives you context (and better quality) than just a
bunch of strings.
Really, the results are better with RC files.
> What would be the best approach using MFC and the simplest way to do this?
Provide RC files for localization + resizing
Then compile (rc.exe /l 0x411 /c 932 ) and link (/dll /noentry).
From the main application load the language DLL, then AfxSetResourceHandle
See http://www.microsoft.com/globaldev/tools/wrapp.mspx
Really, this is what is called "best practice."

Signature
Mihai
-------------------------
Replace _year_ with _ to get the real email