NLS additions to I18N chapter of developers-handbook [Was: Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls]
Robert Watson
rwatson at FreeBSD.org
Wed Mar 18 12:00:43 UTC 2009
On Sat, 14 Mar 2009, Gábor Kövesdán wrote:
> Robert Watson escribió:
>>
>> On Fri, 13 Mar 2009, Gabor Kovesdan wrote:
>>
>>> - Reenable Native Language Support in libc. This feature was disabled
>>> due
>>> to possible breakages in the catalog handling code. Since then, that
>>> code has been replaced by the secure code from NetBSD but NLS in libc
>>> remained turned off. Tests have shown that the feature is stable and
>>> working so we can now turn it on again.
>>
>> Do we have a nice tutorialish document somewhere on what people writing new
>> command line tools or libraries should do in order to address localization
>> requirements, or at least, make it easier for other people to do so? I'm
>> afraid I, at least, live in a world without catalogues, but a quick and
>> practical guide to what The Right Thing Is for FreeBSD would make it much
>> easier for me to do something a bit more mature.
>>
> I've spent some time on writing a short section on this trying to do this
> from a practical viewpoint. Please take a look ant tell me what do you
> think: http://kovesdan.org/files/developers-handbook/posix-nls.html
s/are usual text files/are normal text files/?
I'm a bit surprised there isn't an include file that magically does this for
you?
extern nl_catd catalog;
extern char *nlsstr[];
Is it expected that this same programming approach will work for applications
to be compiled on other platforms, such as Mac OS X, Solaris, and Linux? (I
see the word POSIX, but that has various meanings :-). In particular, suppose
I want to update OpenBSM to use catalogs -- it contains both libraries and
binaries -- will I need to do anything special?
Do you have any advice on what to do for libraries that provide error strings
in their own error spaces? Is it intended that the library's init and destroy
functions will open and close catalogues? Will this work if the application
the library is used by doesn't know about catalogues? Etc...
In the bsd.nls.mk section, there's no worked example, which I think would be
helpful.
You begin by saying "Beyond the basic I18N functions" -- is there an
introduction section that talks about those functions as well?
Is there a comprehensive project to identify opportunities for using
catalogues through the system that need owners? This sounds like it might be
a useful GSoC project if someone can impose some structure on it?
Thanks for working on this,
Robert N M Watson
Computer Laboratory
University of Cambridge
More information about the freebsd-doc
mailing list