| RTL reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link To |
| CODING FOR THE WORLD | |
|
Resource DLL wizard Translation Manager In addition to translating strings, we use the Translation Manager to adjust other propertiessuch as positions and sizes of visual components and fonts. In general english text strings are shorter than localized text strings in other languages. Knowing that text can grow, we should plan our user interface so that visual components don't have to be resized or other elements redesigned when localized. It's pretty hard to determine whether the corrected size of components is ok by just looking at the numbers in the Translation Manager window. To see how will localized form and components look like we need to close the Manager. Since ITE has added a new project to the current project group we have to select the desired language project and open up all the forms to see how they look. If some component is not positioned as it should be, we can freely move it and even change it's properties - just as long as we are not adding new components to the form.
Next time we open up the Translation Manager, the current values will be read from the DFM files (original and translated).
Translation Repository Testing, testing When we run our project, the correct .dll is automatically loaded corresponding to the locale of the computer on which our program runs - Control Panel's Regional Settings.
To start working with the ITE, we use the Project|Language|Add menu command. This starts the Resource DLL wizard where we can select projects that are to be translated, select multiple languages for each project and select whether we are creating a new translation or just updating the one previously created. The Resource DLL wizard generates and manages resource DLLs for the languages we select.
Once we have prepared our project for localization we can use the Project menu to add a language, remove a language and set the projects active language.
To configure options for the Resource DLL wizard, choose Tools|Environment Options|Translation Tools from the Delphi IDE menu.
After we have created resource DLL's for our project we can use the Translation Manager - a grid for viewing and editing translated strings and other resources. This dialog box (View|Translation Manager) displays the languages available in our project, lists all the elements we can translate, shows the base language text as well as translated one and allow us to track earlier versions of the source strings and their translations.
The Translation Repository facilitates the sharing and reuse of terms that have been translated. It does this across projects and shares the work of multiple different developers. While working in the Translation Manager, we can use the Repository to store and retrieve translated strings. To open the Repository, choose Tools|Translation Repository.
To test our localized project we can use the Project|Language|Set Active menu command to tell the IDE (debugger) to load the desired language extension. Before changing the active language, we have to recompiled the resource DLL for the language we want to use.

To activate the localized version of our application we have to close the current one, change the Regional settings, and restart the program. ITE (DLL wizard) is limited in the way that it cannot handle DLL switching efficiently especially between different codeposit, each time language switches it must re-create the forms and all the components on each form, possibly forcing updates to context data. To explore the on-the-fly approach to language switching check out the RichEdit demo project included in the Demo projects that came with Delphi.

More to localize
In addition to translating messages in a localized application we have to make sure that our application supports national conventions and provides country-specific support for numbers, dates, currencies, and numeric values and separators. Another approach is to *only* translate IDE messages like those that appear in standard dialogs: ShowMessage, MessageDlg...
All graphics in this feature created by Zarko Gajic.
| More Delphi |
|
· Learn another routine every day - RTL Quick Reference · Post your VCLs and Apps to the Delphi Programming Members Area. · What do you think? Join the forum. Discuss real programming topics. · Talk about Delphi Programming, real time. · Sign up for free Delphi Programming newsletter! · Don't wait if you have any questions or comments, mail me. · Link to the Delphi Programming site from your Web pages. |
| Tutorials, articles, tips and techniques. |
|
· NEXT ARTICLE:
My IP with Delphi. How to obtain a computer's IP address by using the Socket API and Delphi's Pascal. · More Delphi features by date: 2000 | 1999 | 1998 or by TOPIC. |
| Stay informed with all new and interesting things about Delphi. |
|
|
| Recent Forum discussions ... |

