How to compile executable in multiple languages?

Started by
3 comments, last by Bregma 17 years, 5 months ago
I'm developing an application in Portuguese, which will have to be later translated to English. But instead I would like to have the option of, in the Menu, selecting an option like "Language - Italian", and every text resource in the executable would instead be rendered in that tongue, in this example, Italian. I see that WinACE does exactly what I described. I have Lua scripts available in this project, if I don't find any other solution I'll probably just write a script that alters all the controls on the active dialog to the defined language. It won't be elegant, but it'll work. Does anyone know how to accomplish this? Have multi-tongue resource files perhaps? Btw, I'm using Visual Studio 2003 7.1, C++, no MFC (raw WinAPI). [Edited by - Prozak on November 9, 2006 11:53:39 AM]
Advertisement
Yeah that's pretty much it. Keep all of your strings in your resource file, one section for each language. If the user selects a language, you just change to the appropriate resource.

It's one of those problem where the code is simple, but putting it to good use is tedious.

As far as any error messages, add in unique IDs for each message, so that the user understands what went wrong, but if you want to help them with their problem, you don't have to learn a new language :)
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
if you have to keep things platform-agnostic, you might as well simply use a separate XML file that contains all English strings used in your application, future translation would then simply boil down to copy your english-language XML file and have someone translate it to whatever language, so that you can simply chose the appropriate language file at startup/runtime
The magic word is "internationalization".
Quote:Original post by Zahlman
The magic word is "internationalization"


An alternative spelling is i18n, and don't forget it's mirror-image identical cousing, l10n

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement