mirror of
https://github.com/alfishe/amiga-bootcamp.git
synced 2026-06-13 00:26:28 +00:00
Comprehensive technical documentation covering: - Hardware: OCS/ECS/AGA custom chip registers, Copper & Blitter deep dives - Boot sequence: cold boot through startup-sequence - Binary format: HUNK executable spec, relocation, debug info - Linking & ABI: .fd files, LVO tables, register calling conventions - Exec kernel: tasks, interrupts, memory, signals, semaphores - AmigaDOS: file I/O, FFS/OFS layout, CLI/Shell scripting - Graphics: planar bitmaps, Copper programming, HAM/EHB modes - Intuition: screens, windows, IDCMP, BOOPSI - Devices: trackdisk, SCSI, serial, timer, audio, keyboard - Libraries: utility, expansion, IFFParse, locale, ARexx - Networking: bsdsocket API, SANA-II, TCP/IP stack comparison - Toolchain: GCC, vasm/vlink, SAS/C, NDK, debugging - Reverse engineering: IDA/Ghidra setup, compiler fingerprints, case studies - CPU & MMU: 68040/060 emulation libs, PMMU, cache management - Driver development: SANA-II, Picasso96/RTG, AHI audio All files include breadcrumb navigation. No local paths or proprietary content.
46 lines
999 B
Markdown
46 lines
999 B
Markdown
[← Home](../README.md) · [Libraries](README.md)
|
|
|
|
# locale.library — Internationalisation
|
|
|
|
## Overview
|
|
|
|
`locale.library` (OS 2.1+) provides language-aware string lookup, date/number formatting, and character classification for internationalised applications.
|
|
|
|
---
|
|
|
|
## Core Pattern
|
|
|
|
```c
|
|
struct Library *LocaleBase = OpenLibrary("locale.library", 38);
|
|
struct Catalog *cat = OpenCatalog(NULL, "myapp.catalog",
|
|
OC_BuiltInLanguage, "english",
|
|
TAG_DONE);
|
|
|
|
/* Get localised string: */
|
|
STRPTR str = GetCatalogStr(cat, MSG_HELLO, "Hello"); /* fallback */
|
|
|
|
CloseCatalog(cat);
|
|
CloseLibrary(LocaleBase);
|
|
```
|
|
|
|
---
|
|
|
|
## Locale-Aware Formatting
|
|
|
|
```c
|
|
struct Locale *loc = OpenLocale(NULL); /* user's default */
|
|
|
|
/* Format a date: */
|
|
FormatDate(loc, "%A %e %B %Y", &datestamp, &hook);
|
|
|
|
/* Format a number: */
|
|
/* Uses loc->loc_GroupSeparator, loc->loc_DecimalPoint */
|
|
|
|
CloseLocale(loc);
|
|
```
|
|
|
|
---
|
|
|
|
## References
|
|
|
|
- NDK39: `libraries/locale.h`
|