Important: The information in this document is obsolete and should not be used for new development.
Appendix B - International Resources
This appendix describes the international resources, which constitute the major portion of each Macintosh script system. The international resources define how a script system implements its particular writing system and how it allows for language or regional variations within a writing system.The Script Manager, the Text Utilities, QuickDraw, and the Font Manager all use the international resources directly to handle text in various script systems. TextEdit makes indirect use of information in the international resources through calls to the Script Manager and other managers.
A text application uses the international resources indirectly whenever it makes a call to a script-aware routine in QuickDraw, the Text Utilities, or the Script Manager. It can also access the international resources directly through Script Manager calls, in order to
Your most common reason to access the international resources may be to get a handle or pointer to pass to a text-handling routine. For that task, you do not need the information in this appendix.
- pass a resource handle or pointer as a parameter to a text-handling routine
- extract formatting information from a table within a resource
- modify the contents of a resource, to customize text handling
Read this appendix if your application needs information about the internal structure of one or more international resources. If you need a particular resource table to perform a specific operation, such as formatting currencies or dates, extracting number parts, or converting script-independent tokens to the text of a particular script system, this appendix shows you where to get the information you need.
Read this appendix also if your application requires a custom localized version of some text-handling feature. To provide that feature, you can modify one or more of the international resources and supply that modified version with your application or its documents. In this way, you can localize the formats of numbers, currency, time, dates, and measurement; you can localize string comparison and word selection; you can modify the conversion of strings to tokens; you can specify custom character-rendering behavior; and you can specify custom transliteration rules.
Read this appendix also if you are creating a new script system. A complete script system requires a full set of the appropriate international resources, certain keyboard resources (as described in the appendix "Keyboard Resources" in this book), and one
or more fonts.Before reading this appendix, read the chapter "Introduction to Text on the Macintosh" in this book. The parts of the Macintosh script management system that make use of the resources documented here are described in the chapters "QuickDraw Text," "Text Utilities," and especially "Script Manager," in this book. The Resource Manager, which manages all Macintosh resources, is described in Inside Macintosh: More Macintosh Toolbox.
This appendix describes the international resources in general, shows the relationship between resource ID and script code, shows how to gain access to international resources and use them, and then describes each resource in detail.
Appendix Contents
- About the International Resources
- What the International Resources Are
- Script Codes and Resource ID Ranges
- Using the International Resources
- International Configuration Resource (Type 'itlc')
- The ItlcRecord Data Type
- Script-Sorting Resource (Type 'itlm')
- International Bundle Resource (Type ' itlb')
- The ItlbRecord Data Type
- The ItlbExtRecord Data Type
- Numeric-Format Resource (Type 'itl0')
- The Intl0Rec Data Type
- Long-Date-Format Resource (Type 'itl1')
- The Intl1Rec Data Type
- The Itl1ExtRec Data Type
- String-Manipulation Resource (Type 'itl2')
- Resource Header
- The 'itl2' Sorting Hooks
- The 'itl2' Tables
- Script Run Table Format
- Supplying Custom Sorting Routines
- Supplying Custom Word-Break Tables
- NBreakTable Format
- How FindWordBreaks Uses the Break Table
- Tokens Resource (Type 'itl4')
- The NItl4Rec Data Type
- The Token Table
- The Extension-Fetching Routine
- The Token-String Copy Routine
- The Untoken Table
- The Number Parts Table
- The Whitespace Table
- Encoding/Rendering Resource (Type 'itl5')
- Resource Header
- Tables for 1-Byte Script Systems
- Script Configuration Table
- Line-Layout Metamorphosis Table
- Line-Layout Glyph-Properties Table
- Character Expansion Table
- Glyph-to-Character Table
- Break-Table Directory
- Script Run Tables
- Kashida Preferences Table
- Feature List Table
- Reordering Table
- Tables for 2-Byte Script Systems
- Byte-Type Table
- Character-Type Table
- Transliteration Resource (Type 'trsl')
- Resource Header
- Rule-Based Format
- Table-Based Format
- Summary of the International Resources
- Pascal Summary
- Constants
- Data Types
- C Summary
- Constants
- Data Types