Different language support in BCB SFX:
--------------------------------------

Language support:
==================
Currently, the sfx supports the following languages: 
- Brazilian Portuguese ('BR') (thanks to Celso Malheiro)
- Catalan ('CAT')  (thanks to Eduard Llach and Jordi March i Nogué)
- Danish ('DK')    (thanks to Carsten S. Rasmussen)
- Dutch ('NL')     (thanks to Roger Aelbrecht)
- French ('FR')    (thanks to Nicolas Mastin)
- German ('DE')    (thanks to Markus Stephany) 
- Hungarian ('HU') (thanks to Imre Scofhauser)
- Italian ('IT')   (thanks to Matteo Riso)
- Korean ('KO')    (thanks to Yun Bok Soo) 
- Polish  ('PL')   (thanks to Mariusz Dec) 
- Spanish ('ES')   (thanks to Jorge Almaraz)
- US English ('US')

Each of these sfx bins are stored in a different .bin file:
BR:  sfx\bcbsfxbr.bin
CAT: sfx\bcbsfxcat.bin 
DE:  sfx\bcbsfxde.bin 
DK:  sfx\bcbsfxdk.bin 
ES:  sfx\bcbsfxes.bin 
FR:  sfx\bcbsfxfr.bin                         
HU:  sfx\bcbsfxhu.bin
IT:  sfx\bcbsfxit.bin 
KO:  sfx\bcbsfxko.bin 
NL:  sfx\bcbsfxnl.bin 
PL:  sfx\bcbsfxpl.bin 
US:  sfx\bcbsfxus.bin 
                                        

The .bin files with names bcbsfx__ are created with BCB5 and the source
files in the sfxsource directory.            

TZipBuilderSFx has a property UseDelphiBin if set to true it will use the
dzsfx__.bin files else it uses the bcbsfx__.bin files.
Dzsfx__.bin files are not included in this package, but can be downloaded separataly
                                        
All of the .bin files that should be supported must be placed in a path available to your 
application (e.g. the system directory).    

Including the SFX as resource in your application
-------------------------------------------------
To avoid the need to distribute the required *.bin files with your application 
you can also include the sfx stub as a resource in your application.

Each of these sfx bins is stored as a different .res file stored in the sfxres directory:
BR:  sfxres\bcbsfxbr.res
CAT: sfxres\bcbsfxcat.res
DE:  sfxres\bcbsfxde.res 
DK:  sfxres\bcbsfxdk.res 
ES:  sfxres\bcbsfxes.res 
FR:  sfxres\bcbsfxfr.res
HU:  sfxres\bcbsfxhu.res 
IT:  sfxres\bcbsfxit.res 
NL:  sfxres\bcbsfxnl.res 
KO:  sfxres\bcbsfxko.res
PL:  sfxres\bcbsfxpl.res
US:  sfxres\bcbsfxus.res 
                        
All available languages as sfxres\bcbsfx_all.res  

Include any of the required *.res files in your application, and when
needed the component will recreate the required stub from the resource.       

TZipBuilderSFx has a property UseDelphiBin if set to true it will use the
dzsfx__.res else it uses the bcbsfx__.res resources.
Dzsfx__.res files are not included in this package, but can be downloaded separataly

When a new *.bin version becomes available it is not necessary to recompile 
your application. You can install the new version of the *.bin in a path were the component 
can find it. The build-in version control will use the latest installed version from either 
the resources of the *.bin files.


You may change the language of generated sfx at runtime by setting the SFXLanguage property
to one of the supported languages ("BR", "CAT", "DE", "DK", "ES", "FR", "IT", "NL", "US", "KO") 
before creating a new sfx.

When the resource version is used then the native language identifier can be used for the
SFXLanguage property examples "Nederlands" for NL, "English" for US, "italiano" for IT.


Adding a new language:
=======================
To add another language, take one of the files in the \lang directory (probably the SFXUS.TXT 
file), translate the messages (texts after the equal sign) and save the translated file under 
a different name (replace the language id ('US') by the id of your language).

Then 

either

send me the new translation (roger.aelbrecht@tiscali.be) and i will include the new sfx##.txt, 
bcbsfx##.bin in the next release.
Don't forget to translate the sentence:
<your language> translation by <your name> and include that in the mail so that it can be
added to the About box.

or

create a new sfx##.rc resource file and a new Strings##.cpp file by using the resmaker tool in 
the ResMaker dir.
This tool has a parameter -n, if set it produces a more readable output for long text lines.

1)	Resmaker is a command line tool using following syntax
  a) for the resources part
	resmaker <inputfile.txt> <template.rc> <outputfile.rc>
	
	
  b) for the string##.cpp part
  resmaker <inputfile.txt> <template.cpp> <outpufile.cpp> 
   
	where inputfile.txt is you new translated .txt file
	template.rc = SFX--.RC.IN
	template.cpp = Strings--.in
	outputfile.rc = the .rc file you want to create
	outputfile.cpp =  the .cpp file you want to create
	
	Example for creating NL (Dutch) language variant
	
	resmaker -n sfxNL.txt SFX--.RC.IN SFXNL.rc // creates rc file
	resmaker -n sfxNL.txt Strings--.in StringsNL.cpp // creates the cpp file   
                                                                                
	I provided a batch file to make live easier
	use the 'makelang.bat' with syntax
	makelang <lang>
	where <lang> is the new language indicator 
	to create the new .rc and .cpp files
	                                                                                
2) Open de project files sfxsource with your BCBuilder
3) remove the sfxUS.rc and StringsUS.cpp files from the project
4) add you new .rc and .cpp files to the project                                
5) if you want to created a bin without disk spanning set NO_SPAN defined 
	 in the conditionals (menu Project|Options tab Directories/Conditionals)
   If you want to create a bin with disk spanning options set NO_SPAN not
   defined.
6) rebuild the project the resulting file is called "sfxsource.exe"
7) rename sfxsource.exe to bcbsfx##.bin.
8) since this file will be about 72kB use UPX or a similar tool to compress the .bin

UPX is 

 The Ultimate Packer for eXecutables
  Copyright (c) 1996-2002 Markus Oberhumer & Laszlo Molnar
               http://upx.sourceforge.net

9) Use the 'MakeBinRes' tool to make a new bcbsfx__.res.
	 MakeBinRes is a command line tool, from a DOS console use syntax :
	 MakeBinRes <lang>               
	 where <lang> is the new language indicator 
                                                          
   You can also rebuild the bcbsfx_all.res by the command MakeBinRes ALL
   