Building a Translation Table

[This is preliminary documentation and subject to change.]

A translation table contains the elements to be localized in their original language and a translation to their target language. To build a translation table, create an instance of the __Lexicon system class. The __Lexicon class is defined as follows:

class __Lexicon
{
    [key] string GUID;
    [key] string SourceLocale;
    [key] string TargetLocale;

    string Keywords[ ];        // In the source language
    string Translations[ ];    // Translations to the target language
    string Descriptions[ ];    // Descriptions in the target language
};

The GUID property can contain a unique identifier or one that already exists and is known to be appropriate. The SourceLocale and TargetLocale properties contain strings that define the source and target languages.

The Keywords and Translations properties are ordered pairs of strings. Each pair consists of the string in its original language and the translation to another language. All of the strings in the class to be translated must be included in the Keywords and Translations arrays. If the translation table is to be used for an entire class hierarchy, translations for all of the strings in all of the classes must be listed in these arrays.

The Descriptions property is optional and contains help text in the target language for each Keyword entry.

For example, to translate from English to German, create a __Lexicon instance similar to the following:

Instance of __Lexicon
{
    GUID = "{e588652-edb5-11d0-00c04fb68820}";
    SourceLocale = "ms\\0x409";
    TargetLocale = "ms\\0x407";

    Keywords = 
      { "File", "Search", "Copy","Tree", "Dog", "Pencil" };

    Translations = 
      { "Datei", "Suchen", "Kopieren", "Baum", "Hund", "Bleistift" };

    Descriptions = NULL;
};

The__Lexicon class provides a general purpose translation table; it is not specifically related to any particular class. One instance can be used to localize many different classes if the classes include the strings defined in the Keywords property.

All non-English strings in the Keywords, Translations, or Descriptions properties must be submitted as Unicode text on all platforms to prevent problems with foreign characters.

The __Lexicon class can also be used to supply a list of possible values for a property without translation. To use a translation table to enumerate valid values, set the SourceLocale and TargetLocale properties to the same value. List the possible values in the Keywords property as is shown in this __Lexicon instance:

instance of __Lexicon
{
    GUID = "{e588653-edb5-11d0-00c04fb68820}";
    SourceLocale = "ms\\0x409";
    TargetLocale = "ms\\0x409";
    Keywords = { 
        "640x480 16 Color", 
        "800x600 256 Color", 
        "1024x768 True Color"
        }
}

CIMOM defines a special instance of the __Lexicon class that can be used to translate system properties and standard qualifiers. To identify this translation table as special, the GUID property is set to all zeros:

instance of __Lexicon
{
    GUID = "{00000000-0000-0000-000000000000}"; 
    SourceLocale = "ms\\0x409";
    TargetLocale = "ms\\0x407";
    Keywords = { "__CLASS", "__PATH",         ... etc. }
    Translations = { "__KLASSE", "__PFAND",   ... etc. }
}