ITE and ETM Tutorial for Delphi 2005

By: Technical Publications

Abstract: This tutorial describes how to use the localization tools included in Delphi 2005

This tutorial demonstrates how to use ITE and ETM to localize a simple Delphi project. The project contains one button on the form, and one resource string to load when the button is clicked. Strings to be localized in this sample project: the button's caption and the resource string.

Some technical terms:

Term Description
ITE Integrated Translation Environment
RDW Resource DLL Wizard (for Win32 projects)
SAW Satellite Assembly Wizard (for .Net projects)
TR Translation Repository
ETM External Translation Manager

In Delphi 2005, ITE and ETM only support Win32 VCL forms applications and .NET VCL forms applications. Windows Forms application for .NET is not supported. RDW is used for Win32 projects and SAW for .NET VCL projects.

For the purpose of this tutorial, we will use a Delphi for Win32 project as an example.

Creates the base project:

  1. Start Delphi 2005
  2. File | New | VCL forms application - Delphi for Win32
  3. Drop a standard control TButton from Tool Palette onto the form
  4. In Object Inspector, set the Caption of the button to Click Here
  5. Switch to Code View
  6. In var section, under Form1: TForm1; add the following to declare a resource string: resourcestring greetings = 'Hello world';
  7. Go to Design View, double click on the button, and you are taken to Code View with a Button1Click procedure added
  8. Add Button1.Caption := greetings; to the body of the procedure
  9. Save all.
  • Create a new folder forTutorial under Borland Studio Projects
  1. Run the project to make sure it works.
  • Click on the button, its caption changes to Hello world.

Create resource dll using Resource DLL Wizard (RDW)

  1. File | New | Other | Delphi Projects | Resource DLL Wizard
  2. Click on the Next button
  3. You can see the project name, root directory, and base language
  4. You can change the base language using the pull-down list
  • Change thisEnglish (United States), if not already selected
  1. Click on the Next button
  2. You can select from the list of all the available languages available for creating resource DLLs. Select two and click on Next
  • For this example, selectFrench (France) andGerman (Germany)
  1. The two languages are listed and their path can be edited
  • For this example, leave them as is
  1. Click on Next button to go to the next page, where you can add additional files
  • For this example, we will not be adding any additional files
  1. Click on Next, you will see the actions to be taken
  • The Update Modes are "Create New" since you do not have an existing project to either update or overwrite
  1. Click on Next, the wizard provides a final summary of the resource DLLs to be generated
  2. Click on Finish button
  3. You will see process information as follows

  1. Click on OK, and see a fresh Translation Editor

  1. Go to forTutorial folder where you saved the project and notice that FRA and DEU subfolders are created.
  2. Suppose you want to add or remove languages now, you can either do it by openingResource DLL Wizard again or doing it from Project | Languages | Add/Remove.

Using ITE to do translation

  1. Double click on Unit1.dfm under Project1.FRA in Project Manager
  2. Locate Button1.Caption entry in the Translation Editor
  3. Its status is Untranslated. Change Button1 under French (France) to any French string you want. We use French-Button1 as an example.
  4. Click on Save button on the Translation Editor, and notice Button1's status is changed to Translated.
  5. Double click on Project1_DRC.rc under Project1.FRA in Project Manager
  6. Locate Unit1_greetings entry, and change it to French-hello world. Save and notice its status changes to Translated
  7. Do the same to unit1.dfm and Project1_DRC.rc under Project1.DEU, with strings "translated" to German Button1 and German-hello world.
  8. Project | Compile all projects
  9. Project | Languages | Set active
  10. The default language is English
  11. Change it to French, Run | Run, you will see the translated button caption: French Button1. Click on it, French-hello world will be loaded.
  12. Similar thing will happen if you set the active language to German, except the corresponding German strings will show
  13. Drop another button (or any other control) onto form
  • For this example, we will use another TButton
  1. Project | Languages | Update Localized Projects
  2. Click Yes, when you are asked to save and compile
  3. Check the .dfm's again, the information about the second control will be listed in Translation Editor for you to update

Translation Repository

Translation Repository (*.tmx file) can let you store the translations. This allows you to reuse your translations should the same resource strings appear in a future project.

  1. In Translation Editor, right click on Button1 entry, do Repository | Add strings to repository
  2. Go to IDE main menu, do View | Translation Manager | Translation Repository, You can see the translated strings are listed under each language

Using ETM to do translation

  1. Assuming translation process is done by third-party vendor who does not have access to ITE, developer then need to send zipped localized folder to translator
  2. Translator unzips the files and starts ETM
  3. In ETM, File | Open, open Project1.bdsproj under FRA
  4. Click on Workspace tab, Project1.bdsproj will be expanded

  1. The rest will be similar to what you would do with Translations Editor: do translations in the grid and save the change.
  2. Right click on the translated string, and you have the option to either Add strings to the repository or Get strings from the repository

  1. Click on the Translation Repository button in ETM and you can view the repository.
  2. Click on the Options button, you will see Translation Tools Options. And you can define the Repository options on the Repository page

  1. Close ETM
  2. Send the zipped files under FRA and DEU folders back to the developer

Developer integrates the translated file and creates the localized project

  • Developer gets the files and put them back under the forTutorial directory
  • In Delphi 2005, open the project group
  • In Project Manager, under ProjectGroup1 (or whatever the name you saved as), notice that Project1.FRA and Project1.DEU are listed
  • Right click on Project1.FRA, and Build
  • With the base Project1.exe set active, do Project | language | Set active language, set it to French
  • Run | Run
  • The localized project with French translation is created
  • Go to \\Borland Studio Projects\forTutorial, run Project1.exe to verify all French strings are loaded
  • Same can be done to create the localized German project

** The basic process for localizing a VCL for .NET project is the same. Instead of Resource DLL Wizard, you will use Satellite Assembly Wizard to generate localized satellite assemblies. On a non-US operation system, if you have problem generating localized satellite assemblies, that is because the .NET SDK path is not included in your user PATH. You need to add it (typically c:\Program files\Microsoft.NET\SDK\v1.1\Bin) into your user PATH environment variable.


Server Response from: ETNASC02