Dynamic translation of application
-
Hi !! I'd like to find a way to intercept all displayed texts (on controls, menu, dialog box) for an application. The goal is to intercept such messages and translate text before they are displayed on the application. I think i should use a hook and functions like EnumWindows in order to perform translation. Such a tool still exists but i think it's very good approach in order to enable Multilanguage application. We can imagine that for one application we exports all texts then translate them into a database or ascii file. Then the Dynamic Translator Application intercepts messages for a specified application and translate them before they are displayed. Who has already tries to do such a think ? The only one tool that perfectly fills the goal is WizTom (85 000 $ !!!!!!). Who can help or give some answers ? Thanks
-
Hi !! I'd like to find a way to intercept all displayed texts (on controls, menu, dialog box) for an application. The goal is to intercept such messages and translate text before they are displayed on the application. I think i should use a hook and functions like EnumWindows in order to perform translation. Such a tool still exists but i think it's very good approach in order to enable Multilanguage application. We can imagine that for one application we exports all texts then translate them into a database or ascii file. Then the Dynamic Translator Application intercepts messages for a specified application and translate them before they are displayed. Who has already tries to do such a think ? The only one tool that perfectly fills the goal is WizTom (85 000 $ !!!!!!). Who can help or give some answers ? Thanks
Wow, $85,000 I'll have to check this out, what's the URL? I suppose your talking about not requiring code changes to an existing application, and also that you aren't simply talking about modifying the table of resource strings. Fundamentally I guess, Windows must use one of DrawText, DrawTextEx, or TextOut to accomplish it's own text painting requirements, so intercepting these calls, determining which windows are being written to, and dynamically replacing text should be possible. I've never done this, but I imagine in what you are proposing that the size of the text and the translated text will be different, so there will be clipping and layout problems. Also, you'd need to differentiate between the text painting calls that were being made for the labels, titles, etc., from those that were actually the "interactive" parts of the application. For example, in a data input form, I'd want to replace the text labels, but not the edit box contents... scratches head and contemplates an hour or two in the on-line docs... :) Good luck, and let us know how you progress.
-
Hi !! I'd like to find a way to intercept all displayed texts (on controls, menu, dialog box) for an application. The goal is to intercept such messages and translate text before they are displayed on the application. I think i should use a hook and functions like EnumWindows in order to perform translation. Such a tool still exists but i think it's very good approach in order to enable Multilanguage application. We can imagine that for one application we exports all texts then translate them into a database or ascii file. Then the Dynamic Translator Application intercepts messages for a specified application and translate them before they are displayed. Who has already tries to do such a think ? The only one tool that perfectly fills the goal is WizTom (85 000 $ !!!!!!). Who can help or give some answers ? Thanks
There are a few password sniffing programs I've seen that do this (I hope this is not what you are trying to do... :) You could install a CBT (Computer based training) hook which will give you notifications of most things that occur on the desktop. When a window opens you could, as you say, enumerate the windows and call GetWindowText on each (this will give you the text). Shouldn't be too hard... If you work it out then it would make a great article...
-
Hi !! I'd like to find a way to intercept all displayed texts (on controls, menu, dialog box) for an application. The goal is to intercept such messages and translate text before they are displayed on the application. I think i should use a hook and functions like EnumWindows in order to perform translation. Such a tool still exists but i think it's very good approach in order to enable Multilanguage application. We can imagine that for one application we exports all texts then translate them into a database or ascii file. Then the Dynamic Translator Application intercepts messages for a specified application and translate them before they are displayed. Who has already tries to do such a think ? The only one tool that perfectly fills the goal is WizTom (85 000 $ !!!!!!). Who can help or give some answers ? Thanks
Working on developing international applications myself, I'd say (assuming you have the source-code) that you should re-write some small parts of your code to ensure all strings are within a resource file or a language DLL and you replace all of your string initialisations with a call to retrieve a given enumerated string from there. Hot switching languages then becomes a case of switching between DLL's and is a damn sight easier (assuming you can re-initalise all of your user-interface components). I have a derived CString class that stops me from being lazy, since it must retrieve information from such a source. If you don't have the source code then your results, with the proposed solution, will be variable at best! Many strings are concatinated and decorated with information on the fly... automatic translation of these, especially where word order or tenses can change as the result of some other setting would make this very hard! Ray