[lkml]   [1997]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Jive -> Kernel (International Linux)
    On Thu, 16 Jan 1997, William Sowerbutts wrote:

    > So, forget that. I propose the following solution: The kernel contains all
    > of the messages in English. If the user wants to, they may override some of
    > the messages with their own langauge; if a message isn't overridden the
    > English default is used. Perhaps the memory used up for the English default
    > could be freed in some way?
    > Of course, I've no idea how to code this, I'm not a kernel hacker ;) Maybe
    > an "enhanced_printk" type function? This would allow existing kernel code
    > to function, but new code could supplement the existing code. The
    > enhanced_printk function could be implemented merely as a wrapper around
    > the existing printk?

    You could do this with modules. Create a global variable
    printk_language_hook, which defaults to NULL. Then amend printk() to say:

    asmlinkage int printk(const char *fmt, ...)
    if (printk_language_hook)
    fmt = printk_language_hook(fmt);

    Thus, you can load modules that define printk_language_hook to be a
    pointer to some function that substitutes the original English text with
    something in the chosen language. You'd have to deal with parameters
    somehow, I suppose...


     \ /
      Last update: 2005-03-22 13:38    [W:0.017 / U:62.512 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site