Re: Kernel-Messages translation

Matthias Urlichs (
15 Jun 1997 12:50:10 +0200

Rogier Wolff <> writes:
> Wanted: Maintainer.
> Maintainer will correspond with Linus to see wether he might agree to
> put in a few (*) patches to allow the kernel to be multilingual. If this
> (*) A macro call around EVERY text string.....
I'd use something like

printk(KERN_DEBUG "The foo at %d breaks bar with %s\n",foo,bar)
printk(KERN_DEBUG "The foo at %d breaks baz with %s\n",foo,baz)


and in some file

FOO_BREAKS_BAR KERN_DEBUG "The foo at %d breaks bar with %s\n"
FOO_BREAKS_BAZ KERN_DEBUG "Baz with %s gets trashed by foo at %d/2\n",a2,a1*2

(default: use the number of % characters to count arguments, autocreate
a1...a999 macro variables) which gets autotranslated by a small Perl or Awk
script to

#ifndef printk_FOO_BREAKS_BAR
#define printk_FOO_BREAKS_BAR(a1,a2) printk(KERN_DEBUG "The foo at %d breaks bar with %s\n",(a1),(a2))
#ifndef printk_FOO_BREAKS_BAZ
#define printk_FOO_BREAKS_BAZ(a1,a2) printk(KERN_DEBUG "Baz with %s gets trashed by foo at %d/2\n",(a2),(a1*2))

The advantage is that you can reorder arguments at will (if required for a
language), there will NOT be any kernel bloat, you can include more than
one language before the English default, and we could even autogenerate a
version which supports a runtime language switch (which is the only reason
this would result in any kernel bloat at all).

An alternate solution would be to use the standard internationalization
tools, but I don't see how kernel bloat could be avoided with these.

I'm not convinced that a user-space tool could work. Too much is printed at
boot time that really should be comprehensible to the non-English speaking

You can lead a horticulture, but you can't make her think.
                                -- Dorothy Parker
Matthias Urlichs         \  noris network GmbH  /  Xlink-POP Nürnberg 
Schleiermacherstraße 12   \   Linux+Internet   /   EMail:
90491 Nürnberg (Germany)   \    Consulting+Programming+Networking+etc'ing
   PGP: 1024/4F578875   1B 89 E2 1C 43 EA 80 44  15 D2 29 CF C6 C7 E0 DE
       Click <A HREF="">here</A>.    42