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

National Language Support Library (ITS#1201)



Full_Name: Julius Enarusai
Version: openldap-2.0.11
OS: Linux-2.2.14
URL: ftp://ftp.openldap.org/incoming/libmessage.tar.Z
Submission from: (NULL) (198.133.22.71)


The national Language Support Library (included as part of libldap and
libldap_r) 
includes a set of routines which provide localization support to OpenLDAP. As a
proof of concept, I have included an initial language catalog for the set of
error
codes contained in error.c, called clnt.cat.

In order to take advantage of this new capability, the user would need to
perform
the following:

1. run the configure script with the following option enabled
      ./configure --enable-nls

2. run "make depend" and make as usual.

3. Copy the clnt.cat file to a directory of his/her choice and set the NLSPATH
   environment variable to point to that directory. If the NLSPATH is not set,
then
   the clnt.cat file would need to be copied to one of the following
directories:

     /etc/locale/LC_MESSAGES
     /usr/lib/locale/LC_MESSAGES
     /usr/lib/locale/name/LC_MESSAGES

Once the above steps are completed, whenever you call the ldap_err2string
function, 
it will lookup the given error code from the clnt.cat catalog and return the
matching
language text. If for some reason it fails to open the catalog file, it will
still
return a default english language text for the given error code.

TODO: I am still working on a more detailed description of all the routines
provided
including a HOW-TO.