Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 5 - Text Utilities / Text Utilities Reference
Routines / Determining Sorting Order for Strings in Different Languages


LanguageOrder

The LanguageOrder function determines the order in which strings in two different languages should be sorted.

FUNCTION LanguageOrder (language1, language2: LangCode): Integer;
language1
The language code of the first language.
language2
The language code of the second language.
DESCRIPTION
LanguageOrder takes a pair of language codes and determines in which order strings from the first language should be sorted relative to strings from the second language. It returns a value that indicates the sorting order: -1 if strings in the first language should be sorted before sorting text in the second language, 1 if strings in the first language should be sorted after sorting strings in the second language, or 0 if the sorting order does not matter (that is, if the languages are the same).

Explicit language code values are listed in the chapter "Script Manager"; implicit language codes are listed in Table 5-13 on page 5-55 of this chapter. The implicit language codes scriptCurLang and scriptDefLang are not valid for LanguageOrder because the script system being used is not specified as a parameter to this function.

SPECIAL CONSIDERATIONS
LanguageOrder may move memory; your application should not call this function at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the LanguageOrder function are
Trap macroSelector
_Pack6$0020


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996