How to Translate a program or how can i make a program Translateble
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
There are different way's to to that. The first one is to store every (yes, i mean every) label in a database. Before showing the label you must get it first from the database. It's very easy now to add a language. You only need to add a field for that language in the database. And a translater can fill in the new field. Your sourcecode remains the same. (no recompilations) The other way is to add every label to the stringtable of the resource. You need to recompile when you added a language. But you don't need a database. And the thirth way is the way I'll prefer for your project. Use a XML file with the labels for every language. It's not that hard to parse the XML-file. None of the techniques above are quick and easy to implement. You have to remove every label and get the label in the correct language succes ! W.
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
Another idea is to use a texte file of the following format: 01 "String1" 02 "String2" 03 "String3" .... and so on for every string you need to be translated. You create then a class that loads such a text file (you just have to specify the filename of the file to be loaded) and with a function that returns a string given an index (something like char* LanguageClass->GetString(int StringIndex) ). So, for every string in your project, (for example MessageBox("String1") ), you specify instead: MessageBox(LanguageClass->GetString(1) ). For the controls (for the static textes, you must change the Id to a specific value), you use the SetWindowText function to change the text. So, when you want to use another language you just have to specify another text file to be loaded. For example if you want to specify the language with the command line parameters, you construct your LanguageClass there and you specify wich language file has to be loaded. Hope this helps !
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
Thank you all! I think i use the cmoonen's way. Only not with a Index integer but with the original string. The textfile looks then like this: "Hello" "Hallo" "Error" "Fout" If the string is not found in the textfile then i return the given string, otherwise the translated string will be returned.
-
Thank you all! I think i use the cmoonen's way. Only not with a Index integer but with the original string. The textfile looks then like this: "Hello" "Hallo" "Error" "Fout" If the string is not found in the textfile then i return the given string, otherwise the translated string will be returned.
-
Thank you all! I think i use the cmoonen's way. Only not with a Index integer but with the original string. The textfile looks then like this: "Hello" "Hallo" "Error" "Fout" If the string is not found in the textfile then i return the given string, otherwise the translated string will be returned.
The main problem with this method, is the user can modify the text file, if someone changes a text string such as:- "Press Yes to delete all file" to Press Yes to leave all files" you tend to get some very irate phone calls! Although the good point is that a user can do their own translarions.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
The best solution is using Satellite DLL! A. Riazi
-
Hi, I have programmed a program with Dialogs, menu's, messageboxes, etc. Now it must be translated to different language's. Is there a way to do this fast? It should be great if everybody can translate the program without the sourcecode thus with a textfile or something. Please give some ideas. Thanks, Willem
The best solution is using Satellite DLL. A. Riazi