Language Tokens

<< Click to Display Table of Contents >>

Navigation:  General Functions > Configuring the MIE (Programmer's Guide) > Alternate Language Support >

Language Tokens

Alternate languages are supported through the use of tokens.  A token is a placeholder that is replaced at run-time with the text that matches the current language setting.

The MIE maintains a session variable called Language.  This variable contains the language for the current MIE session.  A catch point screen can be designed to offer a way to set the session variable to a different language setting, thereby changing the language in which the screens are displayed.

Likewise, the workflow engine maintains a thread variable called vLanguage.  That variable contains the language in which the thread should send emails and email questions, and against which any responses to email questions should be interpreted.  The workflow engine contains an action that allows the workflow designer to change the thread language within the workflow itself.  Therefore, a given workflow might change languages several times within the thread.

A token looks as follows:

~|<TextLangLineNo>-<CRC32>|<text>|~

TextLangLineNo - the ID of the text line, from the master text.  The master text is always in English.

CRC32 - the cyclical redundancy code which is calculated using the text.  It is unique for each unique pattern of text.  It is calculated and inserted by the Tokenizer.

Text - the actual text for which the token was created.

NOTE:  Although the original text is part of the token, the text itself will not be used when the token is replaced at run time.  Instead, the text will be retrieved from the message lines table, for the currently defined language, and used to replace the entire token.  If the message in which the token exists is subject to being processed by the Tokenizer, any text changes you make in the main message will be picked up by the Tokenizer and used to update the message lines table - for the master language only.  Any translations of that text must be updated manually.