Localization Code Resource Messages
A telephone tool's localization code resource must be able to handle two messages.
enum {
telL2EnglishMsg = 0,
telL2IntlMsg = 1
};
Constant descriptions
telL2EnglishMsg
- Your tool receives this message when an application calls
TELIntlToEnglish to have your tool translate a configuration string into English. On entry, parameter p1 is a pointer to a C-style (that is, null-terminated) string that contains the configuration information to be translated, and p3 is a language code that specifies the language of that string. The parameter p2 is a pointer to a 4-byte area of memory. Your tool should allocate a nonrelocatable block of memory, copy an English version of the configuration string into that block, and return the address of that block in the 4-byte area pointed to by p2. (The calling application is responsible for disposing of the storage your tool allocated.) If your tool cannot allocate the required storage or does not support the specified language, it should return the value nil in the area pointed to by p2.
telL2IntlMsg
- Your tool receives this message when an application calls
TELEnglishToIntl to have your tool translate a configuration string from English into some other language. On entry, parameter p1 is a pointer to a C-style (that is, null-terminated) string that contains the English language version of the configuration information to be translated. The parameter p3 is a language code that specifies the language into which that string is to be translated. The parameter p2 is a pointer to a 4-byte area of memory. Your tool should allocate a nonrelocatable block of memory, copy a translated version of the configuration string into that block, and return the address of that block in the 4-byte area pointed to by p2. (The calling application is responsible for disposing of the storage your tool allocated.) If your tool cannot allocate the required storage or does not support the specified language, it should return the value nil in the area pointed to by p2.