1. How to...

Globalize your Delphi applications without troubles

How to...

Add Kryvich's Delphi Localizer class to your project:

  • Most easy way is to add KDL.Localizer unit to your project and in project source file after Application.Initialize add these lines:
Application.Initialize;
FreeLocalizer.AutoTranslate := True;
FreeLocalizer.LanguageFile := 'myapp.english.lng';
...

Translation will be loaded from myapp.english.lng language file. All resource strings of your application and all forms and data modules will be automatically translated after their creation.

Generate original language file for your project:

  • In Delphi Environment open menu Project | Options | Linking and enable Output resource string .drc file.
  • Build the project. EXE and DRC files will be created.
  • Run K.D.L. scanner like this:
kdlscan myapp.exe

Source language file myapp.lng will be created. Copy this file and translate to other languages.

Note: If you have an original language file from the previous version of your application you should place this file to the output folder before the kdlscan utility call. Then the build-in String Version Control System (SVCS) will trace all modifications brought by you in string resources after release of the previous version of the application.

Update a language file from the previous version of your application:

  • Generate new original language file as stated above.
  • Run K.D.L. Lng Updater for all your language files:
lngupdate myapp.english.lng myapp.lng -! -x
lngupdate myapp.belarusian.lng myapp.lng -! -x
lngupdate myapp.deutsch.lng myapp.lng -! -x
...

Old language files will be updated according to the new resource content of myapp.exe.

Optional switch "-!" means mark untranslated (new & modified) strings with "(!)" mark. It's convenient for your translators to find out the new strings in a language file. After translation is completed all these marks should be removed from language files.

Optional switch "-x" means leave not used (obsolete & deleted from the application) strings in an output language file marked with "(x)" mark. After translation is completed all these not used strings should be removed entirely.

Where I can get additional information about subject:

The help file is not present yet. But you can see study the source codes of the TFreeLocalizer class. Also see demo projects included and read comments in kdlscan.ini.

f.a.q. page >>