Click here to Skip to main content
15,506,599 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an MFC application which needs multi-language support. I have done this by creating resource-only language DLLs and have copied the resources from the main application to each of the DLLs. The problem is that each of the DLLs has its own Resource.h file and I am concerned that resource numbering could get messy. What is the best way to ensure that the resource numbering will always be consistent across all of the language DLLs?



What I have tried:

I have tried copying resource.h from the main application project into the DLL projects each time I make a change to the resources but surely there is a better way to do this.
Updated 8-Dec-17 3:10am

Yes there is a much better way. You should use a single resource file header and a single DLL. When creating the resources you should use the resource language headers to separate the different language groups. You then specify the language when you load a resource item into your program.
Share this answer
softwaremonkey 8-Dec-17 0:46am    
Hey thanks, this sounds great but I'm not sure how to do it. Do you know of any examples that I could follow?
First, a search for "multiple language resource DLL", unquoted, will give you lots of hints on how to do this stuff.

I seems to me that you should use just one Resource.h. There can be only one if you want your app to work correctly.
Share this answer
Thanks Richard, that sounds like a neater approach. Incidentally, I found this interesting and helpful link which contains details about sharing a common header between multiple resource files...[^].
Share this answer
Richard MacCutchan 8-Dec-17 8:49am    
Really useful link, and I made it clickable. But, for future reference, don't post comments as solutions, use the "Reply" or "Have a Question or Comment" buttons below the relevant message.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900