Re: Jive -> Kernel (International Linux)

David Woodhouse (dwmw2@cam.ac.uk)
Sat, 18 Jan 1997 18:39:34 +0000 (GMT)


There are two options here - either allow for dynamic changing of
language, which presents a few problems, not of which are insurmountable,
or compile the new language directly into the kernel. Personally, I'd
prefer the latter option, as it will be simpler to implement and maintain.

All source files with text constants in a particular section can include a
header file, something along the following lines...

#include <linux/config.h>

#ifdef CONFIG_LANGUAGE_JIVE
#define IDE_PANIC_MSG_1 "Yo disc be like yo mama!"
/* ... */
#endif

#ifdef CONFIG_LANGUAGE_FRENCH
/* ... */
#endif

/* followed by */
#ifndef IDE_PANIC_MSG_1
#define IDE_PANIC_MSG_1 "Disc shagged"
#endif
#ifndef IDE_PANIC_MSG_2
#define IDE_PANIC_MSG_2 "Disc drive on fire"
#endif

etc...

So the strings are kept with the kernel source for the part they're
relevant to, not in a single global text file, and there's a backup
of the English string in case of any string not given a definition in the
correct language.

No kernel bloat (at least only in the source), and not as difficult to
set up _and maintain_ as some of the alternatives.

---- ------------------------------------------------ ----
David Woodhouse, WWW: http://dwmw2.robinson.cam.ac.uk
Robinson College, Email: dwmw2@cam.ac.uk
Cambridge, Tel: +44 (0) 976 658355
CB3 9AN, (n)talk: dwmw2@dwmw2.robinson.cam.ac.uk
England. PGP KEY: finger pgp@dwmw2.robinson.cam.ac.uk
---- ------------------------------------------------ ----