RSV Language Database Format

When you instruct VBLM to build an RSV, it creates either a resource file or a language database containing a list of included languages and all of the translated strings. The database file is written to the target directory and named LANGUAGE.DAT by default, though you can override this and name it anything you want (see RSV Build Options).

The information stored in the database does not vary, but the format in which it is stored depends on whether you select Text or Binary format on the LDB Format window.

Text Format

VBLM's text language database file format has the familiar sectioned and keyed format of an INI file, with a header section named [VBLM] , an optional user-defined section, a section for each language, and if runtime dimension switching is active, a section for each dimset. The header contains keys and values for the number of languages in the file, the name of each language, and the offset of each language section within the file. The language sections consist of keys (Sxxx, where x is the string index) and quoted strings.

Instructed to build an RSV with RDS of the CALC sample app, VBLM created the following edited and annotated sample:

[VBLM]

NumLanguages=2

Language1=English  language table names

Language2=Pig Latin

NumStrings=10   # of strings in each language table

StringIndexBase=100  from the string indexing scheme

StringIndexStep=2  ditto

DimSetEntries=1   # of control containers for which dimension data exists

Language1Start=0000278  offset to strings

Language2Start=0000453

Language1DimSet=0000652 offset to dimension data

Language2DimSet=0001141

[Version]    user data

Major=1

Minor=2

Revision=114

[English]

S102="CALC"

...

S120="Can't divide by zero"

[Pig Latin]

S102="ALCCay"

...

S120="an'tCay ivideday by erozay"

[EnglishDimSet]

1_1=21,1,2535,1155,3360,3345,0,2,120,600,480,480,0,3,720,600,480,480,0,4,1320,600,480,480,0,5,2040,600,480,480,0,6,2640,600,480,480,0,7,120,1200,480,480,0,8,720,1200,480,480,0,9,1320,1200,480,480,0,10,2040,1200,480,480,0,11,2640,1200,480,480,0,12,120,1800,480,480,0,13,720,1800,480,480,0,14,1320,1800,480,480,0,15,2040,1800,480,480,0,16,2640,1800,480,480,0,17,120,2400,1080,480,0,18,1320,2400,480,480,0,19,2040,2400,480,480,0,20,2640,2400,480,480,0,21,120,105,3000,375,0

[Pig LatinDimSet]

1_1=21,1,2535,1155,4032,4014,0,2,144,720,576,576,0,3,864,720,576,576,0,4,1584,720,576,576,0,5,2448,720,576,576,0,6,3168,720,576,576,0,7,144,1440,576,576,0,8,864,1440,576,576,0,9,1584,1440,576,576,0,10,2448,1440,576,576,0,11,3168,1440,576,576,0,12,144,2160,576,576,0,13,864,2160,576,576,0,14,1584,2160,576,576,0,15,2448,2160,576,576,0,16,3168,2160,576,576,0,17,144,2880,1296,576,0,18,1584,2880,576,576,0,19,2448,2880,576,576,0,20,3168,2880,576,576,0,21,144,126,3600,450,0

 

Note: Although this format resembles an INI file, you'll see when you study VBLM_RTA.BAS that the ANSI text version of VBLM_RTString() uses the API profile string function only to read the header, not to fetch strings. This is for performance reasons, as the sequential technique implemented in VBLM_RTString() is 2-3 times faster.

Binary Format

The binary language database file is structured as follows (a long = 4 byte whole number):

Item

Data Type

Explanation

NumLanguages

Long

# of languages in file

DimDataOffset

Long

Offset to dimension data

IndexBase

Long

From indexing scheme

IndexStep

Long

From indexing scheme

For i = 1 to NumLanguages

 

 

String Length

Long

# bytes in language name

Language(i)

String

Name of Language(i)

Offset(i)

Long

Offset where Language(i) string data begins

Next

 

 

NumStrings

Long

# of strings in a table

For i = 1 to NumLanguages For j = 1 to NumStrings

 

 

String Length

Long

# Bytes in string

Language(i) String(j)

String

String

Next: Next