Board index » delphi » Multi-language application

Multi-language application

I would like to build a multi-language application (English, German, French,
Japanese).

Is there any way to have only one EXE file and to have different resource
files, which could be simply loaded in run time.

Thanks, Andrej

 

Re:Multi-language application


Quote
Andrej Zupancic <andrej.zupan...@tipro.si> wrote in message

news:7hh6dn$2b85@forums.borland.com...

Quote
> I would like to build a multi-language application (English, German,
French,
> Japanese).

> Is there any way to have only one EXE file and to have different resource
> files, which could be simply loaded in run time.
>  Thanks, Andrej

Yes you can do that.
One method is as follows:

Compile all your language dependant resources into a separte dll or many
dlls
one fro ech language
At runtime depending on the  language initialize the reqd strings from the
corresponding dll ....

Re:Multi-language application


Quote
>Andrej Zupancic wrote:

>I would like to build a multi-language application (English, German, >French, Japanese).
>Is there any way to have only one EXE file and to have different >resource files, which could be simply loaded in run time.

One resource file should be sufficient. Create a string table with
unique values like that:

Value    String
------------------
   1     File
   2     Open
   3     Close
1001     Fichier
1002     Ouvrir
1003     Fermer
2001     Datei
2002     ?ffnen
2003     Schlie?en

In your project's interface section add

const eng_lang  =    0;  //offset values of string table
      fre_lang  = 1000;
      ger_lang  = 2000;

The users's choice at startup sets const, and you refer to the strings
as n + const .
__________
Andreas

Re:Multi-language application


Quote
Andrej Zupancic wrote:

> I would like to build a multi-language application (English, German, French,
> Japanese).

> Is there any way to have only one EXE file and to have different resource
> files, which could be simply loaded in run time.

> Thanks, Andrej

Take a look at our KMultiLanguage pack:
http://www.korzh.com/kmlang.htm

--
With best regards, Sergey Korzh.
http://www.korzh.com - Delphi components and programming tools.

Other Threads