Board index » cppbuilder » translate / localize an application

translate / localize an application

Hi,

I try to translate my application into an other language.
I would also translate the textes from the VCL. I found
the following textes in the source in <consts.pas>:

unit Consts;

interface

resourcestring
  SOpenFileTitle = 'Open';
  SAssignError = 'Cannot assign a %s to a %s';
  SFCreateError = 'Cannot create file %s';
  SFOpenError = 'Cannot open file %s';
  ...

the corresponding header file contain:

namespace Consts
{
file://-- type
declarations -------------------------------------------------------
file://-- var, const,
procedure ---------------------------------------------------
extern PACKAGE System::ResourceString _SOpenFileTitle;
#define Consts_SOpenFileTitle
System::LoadResourceString(&Consts::_SOpenFileTitle)
extern PACKAGE System::ResourceString _SAssignError;
#define Consts_SAssignError
System::LoadResourceString(&Consts::_SAssignError)
extern PACKAGE System::ResourceString _SFCreateError;
#define Consts_SFCreateError
System::LoadResourceString(&Consts::_SFCreateError)
...

Now I take a look to the RichEdit example. There they demonstrate the
localisation of a application. In the resource file <prjstrs.rc> they
add stringtables:

STRINGTABLE
{
 65528,  "Cannot assign a %s to a %s"
 65529,  "Cannot create file %s"
 65530,  "Cannot open file %s"
 ....

Now my question:
1.) Is it possible to replace the textes from the VCL with textes in a new
language
2.) If yes, how can I add a translation in a rc file. How can I find out the
constants
    for the strings (65528 == _SAssignError Why????).

Regards,
Gnter Wirth

 

Re:translate / localize an application


Hi,

after trying a little bit, I find out how the tool work. The tool read the
exe file from an application
and reproduce the string tables.

At the moment the tools is only a one way tool. Do anybody know a good and
easy way to
expand an existing program?

Regards,
Gnter Wirth

Other Threads