stc - String table compiler |
dklibs.pdf tracecc.pdf |
Purpose of the program | ||||||
Input file structure | ||||||
Input file example | ||||||
Running the conversion |
Purpose of the program
The stc program reads a string table source from a plain text file.
This text file contains strings for several languages.
A directory structure for language/region/encoding is created below
the output directory. Binary string tables - one per language - are
placed in the subdirectories.
The dkstt module can read these string tables. The file finding
mechanism in the dkapp module chooses the string table matching
the user's preferred language.
Input file structure
The input file is read line by line. Comments are started by the
raute (#) character and finished by the end of line.
The input consists of a list of string mappings.
Each string mapping consists of a key string and a list
of scope/value pairs. The scope is started by a language identifier,
region and encoding may follow. Scope and value are separated by
"=". The value is the string for the scope, enclosed in quotes.
Additionally the file may contain optional special information introduced by the keywords "$version", "$author" and "$comment".
Input file example
$version 1.0 $author Dirk Krause $comment A demo string table to show the structure "/msg/h" en = "Hello!" de = "Hallo!" fr = "Bonjour!" "/msg/g" en = "Goodbye!" de = "Mach's gut!" fr = "Au revoir!"
Running the conversion
The conversion is done by
stc <input-file> <target-directory>The target directory is typically a lib directory or one level below a lib directory.
I.e. to install string tables for an application named foo the command line may look like
stc foo.str /usr/local/lib/foo