MLD File

Specification Version 1.1

MLD (MULTILIZER Dictionary) is a file format used by MULTILIZER and MULTILIZER Dictionary Server (MDS). The file extension of MLD is MLD. The purpose of MLD file format is to provide a single file format that has to following features:

MLD file contains the following parts:

Use Language Manager to create and edit MLD files.

Header

The header desrcibes the coding method and locations of the each section in the file. The header contains the following fields:

Field Type Description Version
Tag BYTE[3] Tag, "MLD", $4D $4C $44 1
Version BYTE File format version number. The current MLD version is 3.
Value Description
1 Initial version
2 ISO language and country fields added to the language and locale datas
3 Character set added to the language and locale datas.
Size field added to the language and locale datas
1
Byte order BYTE Byte order used in the file
Value Description
0 Big-endian byte order
1 Little-endian byte order
1
Character set BYTE Character set
Value Description
0 Unicode. Each string is coded using Unicode. UCS-2 is used
1 Windows character set. Each string is code using the Windows code page of the character set that the language uses
2 ISO character set. Each string is code using the ISO character set that the language uses. ISO 8859 (ISO Latin) and ISO 2022 are used
1
Context BYTE The context code of the dicitonary
Value Description
0 Flat. The native string is the key.
1 Full. The key is created by combining the native string, form type/name, and component name.
2 Component. The key is created by combining the native string, and component name
3 Form. The key is created by combining the native string, and form type/name
3
Reserved1 BYTE[5] Reserved for the future use. Must be zeroes. 1
Language count WORD Language count in the file 1
Language offset DWORD File position where the language section starts 1
Translations count WORD Translation count in the file 1
Translations offset DWORD File position where the translation section starts 1
Locale count WORD Locale count in the file 1
Locale offset DWORD File position where the locale section starts 1
Info size WORD Size of the info section in bytes 1
Info offset DWORD File position where the info section starts 1
Reserved2 BYTE[6] Reserved for the future use. Must be zeroes. 1

The size of the header is 42 bytes.

Language Section

The language section contains the data of each language of the dictionary.

[language1][language2]..[languageN]

The language data contains the following fields:

Field Type Version Example
Size of this language data in bytes WORD 3 38
Primary WORD 1 11
ISO language CHAR[2] 2 fi
Default sub WORD 1 1
ISO default country CHAR[2] 2 FI
All subs STRING 1  
ISO all countries STRING 2  
Character set WORD 3 0
Code page WORD 1 1252
Options BYTE 1  
English name STRING 1 Finnish
Native name STRING 1 suomi
Font name STRING 1  
Font size BYTE 1  

In the future the new fields will be add at the end of the data block to make new MLD version backward combatible.

Translation Section

The transaltion section contains the data of each locales of the dictionary.

<native1>[<form>][<component>]<translation1.1>..<translation1.N>
<native2>[<form>][<component>]<translation2.1>..<translation2.N>

<nativeC>[<form>][<component>]<translationC.1>..<translationC.N>

The type of each item is STRING. If the dictionary contains N languages and C rows, the translation section contains (N + 1)*C items (flat dictionary) or (N + 3)*C items (context sensitive dictionary).

The Form field exists only if the Context field of the header is 1 or 3 and the Version field of the header is 3 or greated.

The Component field exists only if the Context field of the header is 1 or 2 and the Version field of the header is 3 or greated.

Locale Section

The locale section contains the data of each locales of the dictionary.

[locale1][locale2]..[localeN]

The locale data contains the following fields:

Field Type Version
Size of this locale data in bytes WORD 3
Primary WORD 1
ISO language CHAR[2] 2
Sub WORD 1
ISO country CHAR[2] 2
Character set WORD 3
Code page WORD 1
Is custom BOOLEAN 1
English language name STRING 1
English country name STRING 1
Native language name STRING 1
Native country name STRING 1
WIN16 language name STRING 1
WIN16 country name STRING 1
Measurement system BYTE 1
Currency string STRING 1
Currency format BYTE 1
Negative currency format BYTE 1
Currency decimals BYTE 1
Thousand separator CHAR 1
Decimal separator CHAR 1
Date separator CHAR 1
Short date format STRING 1
Long date format STRING 1
Time separator CHAR 1
Time AM string STRING 1
Time PM string STRING 1
Time leading zeros BOOLEAN 1
Time format BYTE 1
Time mark position BYTE 1
Calendar type BYTE 1
Optional calendar type BYTE 1
First day of week BYTE 1
First week of year BYTE 1
Short Month Names STRING[12] 1
Long Month Names STRING[12] 1
Short Day Names STRING[7] 1
Long Day Names STRING[7] 1

In the future the new fields will be add at the end of the data block to make new MLD version backward combatible.

Info Section

This section contains information about the MLD file.

Field Type Description Version
Description STRING A textual description about the file 2
Creater STRING The creator of the file 2
User count WORD The user count of the file 2
User STRING[count] The user names of the file 2
Day BYTE The create or last edit date and time of the file in GMT 3
Month BYTE   3
Year WORD   3
Hour BYTE   3
Minute BYTE   3
Second BYTE   3

Data Types

MLD uses the following primary data types:

Name Size in bytes Description
BYTE 1 One byte unsigned integer
BOOLEAN 1 One byte boolean value. True if 1. False if 0.
WORD 2 Two bytes unsigned integer.
DWORD 4 Four bytes unsigned integer.
CHAR 1 or 2 Specifies a character. The actual size of the field depends on the current character coding.
Character set Size in bytes
Unicode 2
Windows and ISO code page 1
STRING variable Specifies a variable length string. Contains two parts.

Unicode:

Part Type Description
Length WORD The length of the string in characters
Data CHAR[Length] Array of characters

Windows and ISO code page:

Part Type Description
Length WORD The length of the string in bytes.
If a Far Eastern character set is used this is generally larger than the length of string in characters.
Data BYTE[Length] Array of characters