Import/Export (LMX) File Format

The Language Table Editor interfaces with the world of ANSI text via its import/export functions, which read and write ANSI Text import/export files. These files, with a default LMX extension, have at least 2 and perhaps 4 sections:

[ExportFile]

[User Text] (Optional)

[Data]

[Excluded Strings] (Optional)

These sections are formatted as follows:

[ExportFile]

The settings of the export options in effect when the file was created are recorded in the [ExportFile] section at the beginning of the LMX, like this:

[VB Language Manager Import/Export File]

[ExportFile]

Version=6

SourceLanguage=English

TransLanguage=Pig Latin

Format=Pairs

Content=All

Sorted=Yes

Quoted=Yes

NoAmpersands=No

Spacing=Single

ExclusionInfo=No

NumEntries=205

IncludeUserInfo=Yes

MissingTrans=NoExport

Note: The NumEntries parameter is a count of the number of strings recorded in the file. If you manually edit an LMX file and either add or delete entries, be sure to update NumEntries to reflect your changes. Don't change anything else in this section, though, because VBLM may behave unpredictably if parameters do not accurately describe the data below.

[User Text]

After the header comes customized user text, if any. This is not necessarily a separate section; it might consist of more keyed entries at the end of the [ExportFile] section. Whatever the user enters is inserted at this point. However, this capability was added in response to a user's desire to get version info in his LDBs and LMX files, so the text might look like this:

[Version]

Major=2

Minor=3

Build=4121

[Data]

The [Data] section follows. Its organization depends on whether the Format option is Pairs or Sections. If Pairs, the data section is composed of entries like this:

SourceLanguageName="Original String"

Context=String#inCode,[trimmed line of code in which string occurs]

TransLanguageName="Translated String"

thus:

[Data]

English="Visual Basic 4.0 Optimization Examples"

Context=1,[Description = "Visual Basic 4.0 Optimization Examples"]

Pig Latin="isualVay asicBay 4.0 Optimizationay Examplesay"

 

English="OPTIMIZE"

Context=1,[Title = "OPTIMIZE"]

Pig Latin="OPTIMIZEay"

 

English="Visual Basic 4.0 Optimization Sample Code."

Context=1,[VersionComments = "Visual Basic 4.0 Optimization Sample Code."]

Pig Latin="isualVay asicBay 4.0 Optimizationay ampleSay odeCay."

If Format is Sections, the original strings are grouped together in the [Original] subsection, code in the [Context] subsection, and all translations in the [Translated] subsection, in that order:

[Data]

[Original]

"Visual Basic 4.0 Optimization Examples"

"OPTIMIZE"

"Visual Basic 4.0 Optimization Sample Code."

[Context]

1,[Description = "Visual Basic 4.0 Optimization Examples"]

1,[Title = "OPTIMIZE"]

1,[VersionComments = "Visual Basic 4.0 Optimization Sample Code."]

[Translated]

"isualVay asicBay 4.0 Optimizationay Examplesay"

"OPTIMIZEay"

"isualVay asicBay 4.0 Optimizationay ampleSay odeCay."

Note: With Section format, the correspondence between original strings, context, and translated strings is determined entirely by their offsets within the section, which are thus VERY IMPORTANT: see Using Import/Export Options for more info.

[ExcludedStrings]

Finally, if the export options are set to include excluded string information, it comes at the end in the form

"Excluded String",Context=String#inCode,[trimmed line of code in which string occurs]

thus

[ExcludedStrings]

"Visual Basic 4.0 Optimization Examples",Context=1,[Description = "Visual Basic 4.0 Optimization Examples"]

"OPTIMIZE",Context=1,[Title = "OPTIMIZE"]

"Visual Basic 4.0 Optimization Sample Code.",Context=1,[VersionComments = "Visual Basic 4.0 Optimization Sample Code."]

See Also

Export: Options

Import Options

Using Pro's Export Options: An Example.