Subject RE: [IBO] Dutch translation of constants.pas
Author Riho-Rene Ellermaa
For run time translations it would be nice to have all strings in one DLL
file, containing string resources (.RC). At least that's what I do in my
apps.
I have EST.DLL and ENG.DLL, etc. When the user defines his language, I load
corresponding DLL module.

In my code I call: ErrorMessage(ResStr(IDS_BAD))

where:
char *ResStr(int AResId)
{
char str[300];
if(!LoadString((HINSTANCE)HInstance,AResId, str, 300))
wsprintf(str,"SYSTEM: Unknown string ID: %d",AResId);
lstrcpy(stringBuff,Translate(str).c_str());
return stringBuff;
}

Riho-Rene Ellermaa
senior programmer
Hansabank

> -----Original Message-----
> From: Jason Wharton [mailto:jwharton@...]
> Sent: Friday, June 22, 2001 10:30 AM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Dutch translation of constants.pas
>
>
> I thought that using the resourcestring instead of const would allow
> flexibility to do it both ways. No?
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>