Important: The information in this document is obsolete and should not be used for new development.
Summary of the International Resources
Pascal Summary
Constants
{ Bits in the itlcFlags byte.} itlcShowIcon = 7; {show icon even if only one script} itlcDualCaret = 6; {use dual caret for mixed direction text} { Bits in the itlcSysFlags word.} itlcSysDirection = 15; {system direction - left/right or right/left} { the NumberParts indices } tokLeftQuote = 1; tokRightQuote = 2; tokLeadPlacer = 3; tokLeader = 4; tokNonLeader = 5; tokZeroLead = 6; tokPercent = 7; tokPlusSign = 8; tokMinusSign = 9; tokThousands = 10; tokSeparator = 12; {11 is a reserved field} tokEscape = 13; tokDecPoint = 14; tokUnquoteds = 15; tokMaxSymbols = 31; curNumberPartsVersion = 1; {current version of NumberParts record} currSymLead = 16; currNegSym = 32; currTrailingZ = 64; currLeadingZ = 128; zeroCycle = 1; {0:00 AM/PM format} longDay = 0; {day of the month} longWeek = 1; {day of the week} longMonth = 2; {month of the year} longYear = 3; {year} supDay = 1; {suppress day of month} supWeek = 2; {suppress day of week} supMonth = 4; {suppress month} supYear = 8; {suppress year} dayLdingZ = 32; mntLdingZ = 64; century = 128; secLeadingZ = 32; minLeadingZ = 64; hrLeadingZ = 128; { Date Orders } mdy = 0; dmy = 1; ymd = 2; myd = 3; dym = 4; ydm = 5;Data Types
TYPE ItlcRecord = RECORD itlcSystem: Integer; {default system script} itlcReserved: Integer; {reserved} itlcFontForce: SignedByte; {default font force flag} itlcIntlForce: SignedByte; {default intl force flag} itlcOldKybd: SignedByte; {MacPlus intl keybd flag} itlcFlags: SignedByte; {general flags} itlcIconOffset: Integer; {reserved} itlcIconSide: SignedByte; {reserved} itlcIconRsvd: SignedByte; {reserved} itlcRegionCode: Integer; {preferred verXxx code} itlcSysFlags: Integer; {flags for setting system globals} itlcReserved4: ARRAY[0..31] OF SignedByte; {for future use} END; ItlbRecord = RECORD itlbNumber: Integer; {itl0 id number} itlbDate: Integer; {itl1 id number} itlbSort: Integer; {itl2 id number} itlbFlags: Integer; {Script flags} itlbToken: Integer; {itl4 id number} itlbEncoding: Integer; {itl5 ID # (optional; char encoding)} itlbLang: Integer; {current language for script } itlbNumRep: SignedByte; {number representation code} itlbDateRep: SignedByte; {date representation code } itlbKeys: Integer; {KCHR id number} itlbIcon: Integer; {ID# of SICN or kcs#/kcs4/kcs8 family} END; ItlbExtRecord = RECORD base: ItlbRecord; {unextended ItlbRecord} itlbLocalSize: LongInt; {size of script's local record} itlbMonoFond: Integer; {default monospace FOND ID} itlbMonoSize: Integer; {default monospace font size} itlbPrefFond: Integer; {preferred FOND ID} itlbPrefSize: Integer; {preferred font size} itlbSmallFond: Integer; {default small FOND ID} itlbSmallSize: Integer; {default small font size} itlbSysFond: Integer; {default system FOND ID} itlbSysSize: Integer; {default system font size} itlbAppFond: Integer; {default application FOND ID} itlbAppSize: Integer; {default application font size} itlbHelpFond: Integer; {default Help Mgr FOND ID} itlbHelpSize: Integer; {default Help Mgr font size} itlbValidStyles: Style; {set of valid styles for script} itlbAliasStyle: Style; {style (set) to mark aliases} END; Intl0Rec = PACKED RECORD decimalPt: Char; {decimal point character} thousSep: Char; {thousands separator character} listSep: Char; {list separator character} currSym1: Char; {currency symbol} currSym2: Char; currSym3: Char; currFmt: Byte; {currency format flags} dateOrder: Byte; {order of short date elements: mdy, dmy, etc.} shrtDateFmt: Byte; {format flags for each short date element} dateSep: Char; {date separator character} timeCycle: Byte; {specifies time cycle: 0..23, 1..12, or 0..11} timeFmt: Byte; {format flags for each time element} mornStr: PACKED ARRAY[1..4] OF Char; {trailing string for AM if 12-hour cycle} eveStr: PACKED ARRAY[1..4] OF Char; {trailing string for PM if 12-hour cycle} timeSep: Char; {time separator character} time1Suff: Char; {trailing string for AM if 24-hour cycle} time2Suff: Char; time3Suff: Char; time4Suff: Char; time5Suff: Char; {trailing string for PM if 24-hour cycle} time6Suff: Char; time7Suff: Char; time8Suff: Char; metricSys: Byte; {255 if metric, 0 if inches etc.} intl0Vers: Integer; {region code (hi byte) and version (lo byte)} END; Intl0Ptr = ^Intl0Rec; Intl0Hndl = ^Intl0Ptr; Intl1Rec = PACKED RECORD days: ARRAY[1..7] OF Str15; {day names} months: ARRAY[1..12] OF Str15; {month names} suppressDay: Byte; {255 for no day, or flags to suppress any element} lngDateFmt: Byte; {order of long date elements} dayLeading0: Byte; {255 for leading 0 in day number} abbrLen: Byte; {length for abbreviating names} st0: PACKED ARRAY[1..4] OF Char; {separator strings for long date format} st1: PACKED ARRAY[1..4] OF Char; st2: PACKED ARRAY[1..4] OF Char; st3: PACKED ARRAY[1..4] OF Char; st4: PACKED ARRAY[1..4] OF Char; intl1Vers: Integer; {region code (hi byte) and version (lo byte)} localRtn: ARRAY[0..0] OF Integer; {a flag for optional extension} END; Intl1Ptr = ^Intl1Rec; Intl1Hndl = ^Intl1Ptr; Itl1ExtRec = RECORD base: Intl1Rec;{un-extended Intl1Rec} version: Integer; {version number} format: Integer; {format code} calendarCode: Integer; {calendar code for 'itl1'} extraDaysTableOffset: LongInt; {offset to extra days table} extraDaysTableLength: LongInt; {length of extra days table} extraMonthsTableOffset: LongInt; {offset to extra months table} extraMonthsTableLength: LongInt; {length of extra months table} abbrevDaysTableOffset: LongInt; {offset to abbrev. days table} abbrevDaysTableLength: LongInt; {length of abbrev. days table} abbrevMonthsTableOffset:LongInt; {offset to abbr. months table} abbrevMonthsTableLength:LongInt; {length of abbr. months table} extraSepsTableOffset: LongInt; {offset to extra seps table} extraSepsTableLength: LongInt; {length of extra seps table} tables: ARRAY[0..0] OF Integer; {the tables; variable-length} END; NItl4Rec = RECORD flags: Integer; {reserved} resourceType: LongInt; {contains 'itl4'} resourceNum: Integer; {resource ID} version: Integer; {version number} format: Integer; {format code} resHeader: Integer; {reserved} resHeader2: LongInt; {reserved} numTables: Integer; {number of tables, one-based} mapOffset: LongInt; {table that maps byte to token} strOffset: LongInt; {routine that copies string} fetchOffset: LongInt; {routine to get next byte of character} unTokenOffset: LongInt; {table that maps token to string} defPartsOffset: LongInt; {offset to default number parts table} whtSpListOffset: LongInt; {offset to whitespace table} resOffset7: LongInt; {reserved} resOffset8: LongInt; {reserved} resLength1: Integer; {reserved} resLength2: Integer; {reserved} resLength3: Integer; {reserved} unTokenLength: Integer; {length of untoken table} defPartsLength: Integer; {length of number parts table} whtSpListLength: Integer; {length of whitespace table} resLength7: Integer; {reserved} resLength8: Integer; {reserved} END; NItl4Ptr = ^NItl4Rec; NItl4Handle = ^NItl4Ptr; UntokenTable = RECORD len: Integer; lastToken: Integer; index: ARRAY[0..255] OF Integer; {index table; last=lastToken} END; UntokenTablePtr = ^UntokenTable; UntokenTableHandle = ^UntokenTablePtr; WideChar = RECORD CASE Boolean OF TRUE: (a: PACKED ARRAY[0..1] OF Char);{0 is the high order character} FALSE: (b: Integer); END; WideCharArr = RECORD size: Integer; data: PACKED ARRAY[0..9] OF WideChar; END; NumberParts = RECORD version: Integer; data: ARRAY[1..31] OF WideChar; pePlus: WideCharArr; peMinus: WideCharArr; peMinusPlus: WideCharArr; altNumTable: WideCharArr; reserved: PACKED ARRAY[0..19] OF Char; END; NumberPartsPtr = ^NumberParts; Itl5Record = RECORD versionNumber: Fixed; {itl5 resource version number} numberOfTables: Integer; {number of tables it contains} reserved: ARRAY[0..2] OF Integer; {reserved for internal use} tableDirectory: ARRAY[0..0] OF TableDirectoryRecord; {table directory records} END; TableDirectoryRecord = RECORD tableSignature: OSType ; {4 byte long table name} reserved: LongInt; {reserved for internal use} tableStartOffset: LongInt ; {table start offset in bytes} tableSize: LongInt; {table size in bytes} END; RuleBasedTrslRecord = RECORD sourceType: Integer; {target type for left side of rule} targetType: Integer; {target type for right side of rule} formatNumber: Integer; {transliteration resource format number} propertyFlag: Integer; {transliteration property flags} numberOfRules: Integer; {Number of rules following this field} END;C Summary
Constants
enum { /* Bits in the itlcFlags byte. */ itlcShowIcon = 7, /*show icon even if only one script*/ itlcDualCaret = 6, /*use dual caret for mixed direction text*/ /* Bits in the itlcSysFlags word. */ itlcSysDirection = 15, /*System direction--left/right or right/left*/ /* the NumberParts indices */ tokLeftQuote = 1, tokRightQuote = 2, tokLeadPlacer = 3, tokLeader = 4, tokNonLeader = 5, tokZeroLead = 6, tokPercent = 7, tokPlusSign = 8, tokMinusSign = 9, tokThousands = 10, tokSeparator = 12, /*11 is a reserved field*/ tokEscape = 13, tokDecPoint = 14, tokUnquoteds = 15, tokMaxSymbols = 31, curNumberPartsVersion = 1 /*current version of NumberParts record*/ }; enum { currSymLead = 16, currNegSym = 32, currTrailingZ = 64, currLeadingZ = 128, }; enum {mdy,dmy,ymd,myd,dym,ydm}; enum { zeroCycle = 1, /*0:00 AM/PM format*/ longDay = 0, /*day of the month*/ longWeek = 1, /*day of the week*/ longMonth = 2, /*month of the year*/ longYear = 3, /*year*/ supDay = 1, /*suppress day of month*/ supWeek = 2, /*suppress day of week*/ supMonth = 4, /*suppress month*/ supYear = 8, /*suppress year*/ dayLdingZ = 32, mntLdingZ = 64, century = 128, secLeadingZ = 32, minLeadingZ = 64, hrLeadingZ = 128 };Data Types
typedef unsigned char DateOrders; struct ItlcRecord { short itlcSystem; /*default system script*/ short itlcReserved; /*reserved*/ char itlcFontForce; /*default font force flag*/ char itlcIntlForce; /*default intl force flag*/ char itlcOldKybd; /*MacPlus intl keybd flag*/ char itlcFlags; /*general flags*/ short itlcIconOffset; /*reserved*/ char itlcIconSide; /*reserved*/ char itlcIconRsvd; /*reserved*/ short itlcRegionCode; /*preferred verXxx code*/ short itlcSysFlags; /*flags for setting system globals*/ char itlcReserved4[32]; /*for future use*/ }; typedef struct ItlcRecord ItlcRecord; struct ItlbRecord { short itlbNumber; /*itl0 id number*/ short itlbDate; /*itl1 id number*/ short itlbSort; /*itl2 id number*/ short itlbFlags; /*Script flags*/ short itlbToken; /*itl4 id number*/ short itlbEncoding; /*itl5 ID # (optional; char encoding)*/ short itlbLang; /*current language for script */ char itlbNumRep; /*number representation code*/ char itlbDateRep; /*date representation code */ short itlbKeys; /*KCHR id number*/ short itlbIcon; /*ID # of SICN or kcs#/kcs4/kcs8 family.*/ }; typedef struct ItlbRecord ItlbRecord; /* New ItlbExtRecord structure for System 7 */ struct ItlbExtRecord { ItlbRecord base; /*unextended ItlbRecord*/ long itlbLocalSize; /*size of script's local record*/ short itlbMonoFond; /*default monospace FOND ID*/ short itlbMonoSize; /*default monospace font size*/ short itlbPrefFond; /*preferred FOND ID*/ short itlbPrefSize; /*preferred font size*/ short itlbSmallFond; /*default small FOND ID*/ short itlbSmallSize; /*default small font size*/ short itlbSysFond; /*default system FOND ID*/ short itlbSysSize; /*default system font size*/ short itlbAppFond; /*default application FOND ID*/ short itlbAppSize; /*default application font size*/ short itlbHelpFond; /*default Help Mgr FOND ID*/ short itlbHelpSize; /*default Help Mgr font size*/ Style itlbValidStyles; /*set of valid styles for script*/ Style itlbAliasStyle; /*style (set) to mark aliases*/ }; typedef struct ItlbExtRecord ItlbExtRecord; struct Intl0Rec { char decimalPt;/*decimal point character*/ char thousSep;/*thousands separator character*/ char listSep; /*list separator character*/ char currSym1;/*currency symbol*/ char currSym2; char currSym3; unsigned char currFmt; /*currency format flags*/ unsigned char dateOrder; /*order of short date elements:mdy,dmy,etc.*/ unsigned char shrtDateFmt; /*format flags for each short date element*/ char dateSep; /*date separator character*/ unsigned char timeCycle; /*specifies time cycle:0..23,1..12,or 0..11*/ unsigned char timeFmt; /*format flags for each time element*/ char mornStr[4]; /*trailing string for AM if 12-hour cycle*/ char eveStr[4]; /*trailing string for PM if 12-hour cycle*/ char timeSep; /*time separator character*/ char time1Suff; /*trailing string for AM if 24-hour cycle*/ char time2Suff; char time3Suff; char time4Suff; char time5Suff; /*trailing string for PM if 24-hour cycle*/ char time6Suff; char time7Suff; char time8Suff; unsigned char metricSys; /*255 if metric, 0 if inches etc.*/ short intl0Vers; /*region code (hi byte) and version (lo byte)*/ }; typedef struct Intl0Rec Intl0Rec; typedef Intl0Rec *Intl0Ptr, **Intl0Hndl; struct Intl1Rec { Str15 days[7]; /*day names*/ Str15 months[12]; /*month names*/ unsigned char suppressDay; /*255 = no day, or flags to suppress elements*/ unsigned char lngDateFmt; /*order of long date elements*/ unsigned char dayLeading0; /*255 for leading 0 in day number*/ unsigned char abbrLen; /*length for abbreviating names*/ char st0[4]; /*separator strings for long date format*/ char st1[4]; char st2[4]; char st3[4]; char st4[4]; short intl1Vers; /*region code (hi byte) and version (lo byte)*/ short localRtn[1]; /*now a flag for opt extension*/ }; typedef struct Intl1Rec Intl1Rec; typedef Intl1Rec *Intl1Ptr, **Intl1Hndl; struct Itl1ExtRec { /*fields for optional itl1 extension*/ Intl1Rec base; /*un-extended Intl1Rec*/ short version; short format; short calendarCode; /*calendar code for this itl1 resource*/ long extraDaysTableOffset; /*offset in itl1 to extra days table*/ long extraDaysTableLength; /*length of extra days table*/ long extraMonthsTableOffset; /*offset in itl1 to extra months table*/ long extraMonthsTableLength; /*length of extra months table*/ long abbrevDaysTableOffset; /*offset in itl1 to abbrev days table*/ long abbrevDaysTableLength; /*length of abbrev days table*/ long abbrevMonthsTableOffset; /*offset in itl1 to abbrev months table*/ long abbrevMonthsTableLength; /*length of abbrev months table*/ long extraSepsTableOffset; /*offset in itl1 to extra seps table*/ long extraSepsTableLength; /*length of extra seps table*/ short tables[1]; /*now a flag for opt extension*/ }; typedef struct Itl1ExtRec Itl1ExtRec; struct UntokenTable { short len; short lastToken; short index[256]; /*index table; last = lastToken*/ }; typedef struct UntokenTable UntokenTable; typedef UntokenTable *UntokenTablePtr, **UntokenTableHandle; union WideChar { char a[2]; /*0 is the high-order character*/ short b; }; typedef union WideChar WideChar; struct WideCharArr { short size; WideChar data[10]; }; typedef struct WideCharArr WideCharArr; struct NumberParts { short version; WideChar data[31]; /*index by [tokLeftQuote..tokMaxSymbols]*/ WideCharArr pePlus; WideCharArr peMinus; WideCharArr peMinusPlus; WideCharArr altNumTable; char reserved[20]; }; typedef struct NumberParts NumberParts; typedef NumberParts *NumberPartsPtr; /* New NItl4Rec for System 7.0: */ struct NItl4Rec { short flags; /*reserved*/ long resourceType; /*contains 'itl4'*/ short resourceNum; /*resource ID*/ short version; /*version number*/ short format; /*format code*/ short resHeader; /*reserved*/ long resHeader2; /*reserved*/ short numTables; /*number of tables, one-based*/ long mapOffset; /*offset to table that maps byte to token*/ long strOffset; /*offset to routine that copies canonical string*/ long fetchOffset; /*offset to routine that gets next byte of char.*/ long unTokenOffset; /*offset to table that maps token to canon. string*/ long defPartsOffset; /*offset to number parts table*/ long whtSpListOffset; /*offset to whitespace table*/ long resOffset7; /*reserved*/ long resOffset8; /*reserved*/ short resLength1; /*reserved*/ short resLength2; /*reserved*/ short resLength3; /*reserved*/ short unTokenLength; /*length of untoken table*/ short defPartsLength; /*length of default number parts table*/ short whtSpListLength; /*length of whitespace table*/ short resLength7; /*reserved*/ short resLength8; /*reserved*/ }; typedef struct NItl4Rec NItl4Rec; typedef NItl4Rec *NItl4Ptr, **NItl4Handle; struct TableDirectoryRecord { OSType tableSignature; /*4 byte long table name */ unsigned long reserved; /*reserved for internal use */ unsigned long tableStartOffset; /*table start offset in byte*/ unsigned long tableSize; /*table size in byte*/ }; typedef struct TableDirectoryRecord TableDirectoryRecord; struct Itl5Record { Fixed versionNumber; /*itl5 resource version number */ unsigned short numberOfTables; /*number of tables it contains */ unsigned short reserved[3]; /*reserved for internal use */ TableDirectoryRecord tableDirectory[1]; /*table directory records */ }; typedef struct Itl5Record Itl5Record; struct RuleBasedTrslRecord { short sourceType; /*target type for left side of rule */ short targetType; /*target type for right side of rule */ short formatNumber; /*transliteration resource format number */ short propertyFlag; /*transliteration property flags */ short numberOfRules; /*number of rules following this field */ }; typedef struct RuleBasedTrslRecord RuleBasedTrslRecord;