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 /
Appendix B - International Resources


Script-Sorting Resource (Type 'itlm')

The script-sorting resource (resource type 'itlm') lists, in preferred sorting order, a
set of script codes, language codes, and region codes. For each listed script system it defines the default language; for each listed language it defines the script system that language belongs to; and for each listed regional version it describes the language
that region belongs to. The listing may be sparse; not all defined script, language, and region codes need appear in the resource. Only one script-sorting resource is provided with each localized version of Macintosh system software. It is in the System file. Its resource ID is 0.

One purpose of the script-sorting resource is to aid the sorting of multilanguage lists. Each individual script system defines, in its string-manipulation ('itl2') resource, how its own strings are sorted; the script-sorting resource defines how strings in two or more different scripts (or languages or regions) are ordered. For example, the string-manipulation resource for the Japanese script system defines the order in which Japanese strings appear in a sorted list. The script-sorting resource, on the other hand, defines whether Japanese strings appear before or after Roman strings in a sorted list.

IMPORTANT
Regardless of the sorting order presented in the script-sorting resource, text in the system script is always sorted to appear ahead of text in any other script system.
Another purpose of the script-sorting resource is to provide a mapping among scripts, languages, and regions. From information in the resource you can determine all
the languages of a listed script system, and all the regional variations of a listed language.

The script-sorting resource consists of a resource header followed by three tables.
Figure B-1 shows the format of the resource header.

Figure B-1 Format of the script-sorting resource header

The resource header contains these elements:

Currently there are three defined tables in the script-sorting resource: the script data table, the language data table, and the region data table. The formats of the three tables are similar, as shown in Figure B-2.

Figure B-2 Script, language, and region data tables in the script-sorting resource

Each table consists of a header, followed by an array of paired integers. These are the fields in the script data table, language data table, and region data table, respectively:

Constants for all defined script codes, language codes, and region codes are listed in the chapter "Script Manager" in this book.

Table B-3 lists a sorting hierarchy of scripts, languages, and regions generated from a sample script-sorting resource. Not all scripts and languages are represented in this list because region codes do not currently exist for all language codes and script codes.
Table B-3 Sorted scripts, languages, and regions from a script-sorting resource (Continued)
Script codeLanguage codeRegion code 
smRomanlangEnglishverUS 
  verBritain 
  verAustralia 
  verIreland 
 langFrenchverFrance 
  verFrBelgiumLux 
  verFrCanada 
  verFrSwiss 
    
 langGermanverGermany 
  verGrSwiss 
 langItalianverItaly 
 langDutchverNetherlands 
 langSwedishverSweden 
 langSpanishverSpain 
 langDanishverDenmark 
 langPortugueseverPortugal 
 langNorwegianverNorway 
 langFinnishverFinland 
 langIcelandicverIceland 
 langMalteseverMalta 
 langTurkishverTurkey 
 langLithuanianverLithuania 
 langEstonianverEstonia 
 langLettishverLatvia 
 langSaamiskverLapland 
 langFaeroeseverFaeroeIsl 
 langCroatianverYugoCroatian 
smEastEurRomanlangPolishverPoland 
 langHungarianverHungary 
smGreeklangGreekverGreece 
smCyrilliclangRussiaverRussia 
smArabiclangArabicverArabic 
 langUrduverPakistan 
 langFarsiverIran 
smHebrewlangHebrewverIsrael 
smDevanagarilangHindiverIndiaHindi 
smThailangThaiverThailand 
smTradChineselangTradChineseverTaiwan 
smSimpChineselangSimpChineseverChina 
smJapaneselangJapaneseverJapan 
smKoreanlangKoreaverKorea 


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996