|author||PulkoMandy <firstname.lastname@example.org>||dim. févr. 19 10:32:36 2023 +0100|
|committer||PulkoMandy <email@example.com>||dim. févr. 19 10:32:36 2023 +0100|
Do not rely on libtextencoding for conversions. It create two types of problems: - If the translator is not linked with libtextencoding, it can't be used in apps that don't link with it - If the translator is linked with libtextencoding, it deadlocks apps that don't link with it Since the conversion from ISO 8859 to UTF8 is simple enough, implement it manually.
Amiga applications use a locale catalog format based on IFF. It is fairly simple:
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.