Multilingual Windows errors in Gambit Lassi Kortela 28 Jul 2020 19:55 UTC

I managed to install Gambit with Mingw on Windows and explored the NLS
(National Language Support) corner of the Windows API a bit. NLS is a
maze of twisty passages all alike, but in the end multilingual errors
can be made to work with about 100 lines of clean Scheme and C.

I have a Finnish copy of Windows (version 10 I think) which apparently
has both Finnish and English translations of the errors installed. I can
access both from Scheme concurrently without switching languages in the
OS control panel. The API function EnumUILanguages() gets the language
IDs for all available UI languages. A language ID is a 16-bit unsigned
integer: a 10-bit primary language ID and a 6-bit sublanguage ID.

Here's the code: <https://misc.lassi.io/2020/windows198.scm>.