|
-
October 19th, 2008, 04:02 AM
#1
Software translation. MFC
Hey. I am trying to create a multi-language MFC application, with languages changed at runtime, because, it being freeware, I will count on users to translate the program. Now I am aware of the resource.dll solution and it works ok. The problem is that each dll must contain the same icons, dialogs, menus, toolbars... etc. That is hard to support because I will have to maintain a lot of resources, that are essentially the same, between versions.
Is there no way supported by MFC or some MFC extention that allows string-only localization?
It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames
-
October 20th, 2008, 04:33 AM
#2
Re: Software translation. MFC
What you want could be very dangerous: you must not use any letters/digits/punctuation marks on your images because they can have absolutely different meaning in different languages.
Also the images itself might be not acceptable by some cultures.
Read more about "internalization"/"localization" in http://www.manzana.co.uk/en/index_fi...nalisation.pdf
Victor Nijegorodov
-
October 20th, 2008, 06:50 AM
#3
Re: Software translation. MFC
There is no easy method by which end users can create localized version. You should just create an unicode compatible version where all resources all properly used (like all strings from string table). The end users can use some tools(like lingobit localizer) to create localized version.
Regards,
Ramkrishna Pawar
-
October 20th, 2008, 07:27 AM
#4
Re: Software translation. MFC
Hi,
I encountered this same problem with an application we ship throughout Europe, there are a few different ways round it.
The simplest is to just use one resource DLL for all languages. Bitmaps, icons etc. can just be left in English, but for anything you want to localise, you add a version for that language (with the same resource ID as the English one) Windows will decide which item to load from the resource file depending on the Windows Regional Settings.
Another way is to keep some of the resources in the program itself, and some in the resource DLL. This is the method I decided on, since you can then have different resource DLLs for each language, and can choose which DLL to load yourself. When you load resources you just need to decide whether to load from the resource DLL or the main program.
Note that if you are going to use the same version of the dialogs for every language, you'll have to be careful to resize them to allow for the longest possible string. Typically that will be up to about twice the size of the original English.
Cheers,
Alan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|