[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: National Language Support Library



At 07:34 AM 5/24/01, Julius Enarusai wrote:
>IBM would like to contribute a library which can be used to add localization support to OpenLDAP. The library includes:
>
>1. a set of routines used to construct XPG4 compliant catalogs from a text file. 
>2. a set of routines used to retrieve messages from the an XPG4 compliant catalog file. 

I would suggest that these routines by used conditionally as
we should like try to use XPG4 routines provided by the C library
(whenever available).  When "builtin" XPG4 routines are used, they
should be used through macros which keep our symbols from clashing
with "real" XPG4 routines.  That is, some header (ldap_nl_types.h)
should define catgets() to ldap_pvt_catgets().  Our code should
use catgets() as if it has the real thing.

I would note that the routines would likely have to be placed
in -llber...

>3. an initial Message Catalog for slapd, which can be expanded as more error codes/messages are added to slapd. 

I would suggest one start localization effort with -lldap's
ldap_err2string() and other strings generated by the API and
returned normally to applications.  This is what "users"
see first.

>If this library is accepted by the community and incorporated into OpenLDAP, it will provide the following benefits: 
>
>1. ability to log LDAP error and informational messages in the user's local language. 
>2. ability for LDAP client applications developers to customize LDAP error and informational messages. 

The localization should, of course, be driven by the environment.
Applications can manage this environment on behalf of the
use...  our code should localize to whatever locale is returned
by setlocale( LC_MESSAGES, NULL ).

I note that OpenLDAP may still have some pieces of code dependent
on running in the "C" locale.

>3. ability for LDAP client applications developers to add their own error codes/messages and use a common interface to retrieve their messages. 

For the latter, I rather the application developer use tools provided
by others and not whatever flavor of catgets() we have embedded.

Kurt