Extracting strings from sources
Localized strings can be easily extracted from .4gl and .per source files.
Use the fglcomp and fglform compilers with the
-m option to extract localized
strings.
$ fglcomp -m mymodule.4glThe compilers dump all localized string to stdout. This output can be redirected to a file to generate the default source string file with all the localized strings used in the source file. Source string files can then be re-organized, to centralize common messages in a unique .str file, and can then be compiled by fglmkstr into .42s files to be used by the runtime system.
To extract the localized strings from a .per form specification
file:
$ fglform -m myform.perWhen extracting localized strings from a .per file, forms included with the
FORM clause in the
LAYOUT section are not processed. Only the localized strings of the specified
.per file are extracted. To extract the strings of an included form, run the
extraction on that form file separately.