Friday, July 16, 2004

Localizing Borland runtime packages

Today, I saw someone on a Czech Delphi mailing list saying that it's not possible to localize Borland runtime packages using Delphi's built-in Translation Manager. Well, it certainly is possible; all you have to do is create a package project with the same structure (ie. containing the same units) as the target package.
The easiest way to create such a package is to let the Delphi IDE generate it for you ;-)
It does it when you double-click a .dcp node in the package designer, so, for example, if you want it to generate vcldb.bpl you first need to open a package which contains vcldb.dcp in its requires clause. Or create a new temporary .dpk project and add vcldb.dcp to its requires clause so you can double-click it.
Save the generated package project under a name corresponding with the target .bpl file name - for example, in Delphi 7 save generated vcldb.dpk as vcldb70.dpk. This will make the Translation Manager create the correct resource DLL project file name and you won't have to rename it before deployment.
From this point on, everything is pretty much standard - you use the Translation Manager to add new languages and translate the resources as usual. I've just tried it and it works. Easy, isn't it?
Post a Comment