Compiling the program

Compile the program and string file using Genero Studio or command line tools.

From Genero Studio

As you learned earlier in the Tutorial, the Execute option in the Genero Studio Project view will compile and link files in the specified application node if necessary before executing the application. This behavior also applies to String Source files (.str). String Source files can also be compiled independently with the Compile File option.

This figure is a screenshot that shows how Genero Studio will compile String Source files when the Execute option is selected.

Figure 1. Using the Execute option to compile and execute the progstrings program

To Compile and execute from the command line

The program is compiled into progstrings.42r.
fgl2p -o progstrings.42r prog.4gl
The progstring.str string file must be compiled:
fglmkstr progstring.str 

The resulting Compiled String File is progstring.42s.

Setting the list of compiled string files in the fglprofile file.

The list of Compiled String Files is specified in the fglprofile configuration file. The runtime system searches for a file with the "42s" extension in the current directory and in the path list defined in the DBPATH / FGLRESOURCEPATH environment variable. Specify the total number of files, and list each file with an index number.

Example fglprofile file

01 fglrun.localization.file.count = 2
02 fglrun.localization.file.1.name = "form"
03 fglrun.localization.file.2.name = "prog"

Setting the environment

Set the FGLPROFILE environment variable:
export FGLPROFILE=./fglprofile 

Running the program

Run the program:
fglrun cust 

The Resulting Form Display

Display of the form using the default values for the strings.

This figure is a screenshot of the form with default (untranslated) values for Localized Strings.

Figure 2. Form with default values for strings

Display of the form when the Compiled String File is deployed.

This figure is a screenshot of the form with the compiled String File. Localized Strings in the form and program module are translated.

Figure 3. Form using compiled string file