Use Amiga/MorphOS locale catalogs with Haiku locale kit

Clone this repo:

Branches

  1. 112be65 Fix multiline strings handling and warnings in escape characters handling by PulkoMandy · 6 months ago main
  2. a35ca26 generate_header: fix handling of escape sequences by PulkoMandy · 1 year, 1 month ago
  3. f76fe86 Do not rely on libtextencoding for conversions. by PulkoMandy · 1 year, 2 months ago
  4. 3e08853 Add a tool to generate locale_strings.h from .cs file by PulkoMandy · 1 year, 2 months ago 0.4
  5. 31e4a02 Fix catalog search directory by Adrien Destugues · 3 years, 11 months ago 0.3

Amiga applications use a locale catalog format based on IFF. It is fairly simple:

  • type: CTLG

  • chunks: FVER, LANG, CSET, STRS

  • FVER: the standard version chunk; contain the version of the app to be localized

  • LANG: holds a string which is the name of the target language

  • CSET: I don't know what this is, apparently unused.

  • STRS: the translated strings. The format is 2 DWORDs followed by the string data. The first dword is the string ID, the second is the length. Each string is padded so each entry in the table starts on a DWORD boundary.

String lookup is done by ID only, unlike the Haiku native catalog formats which does lookup by strings instead. This is faster as there is no need to hash the source string, and no possibility of hash collision.

This project is distributed under the terms of the MIT license.