[sugj-tech:1840] SWAT internatinalization project is working
rkawa at lbe.co.jp
Sun Oct 8 14:09:29 GMT 2000
Hello,...I'm making "internationalized" SWAT patch for 2.2.
----- Original Message -----
From: Hiroshi MIURA <miura at samba.gr.jp>
To: <samba-technical at samba.org>
Cc: <sugj-tech at samba.gr.jp>
Sent: Sunday, October 08, 2000 4:12 PM
Subject: [sugj-tech:1840] SWAT internatinalization project is working
> I and Ryo Kawahara who is the members of Samba User Group Japan
> are developing SWAT internationalization(I18N) using GNU gettext library.
> What is this feature?
> A browser like Netscape or Internet Explorer on client send the
> language negotiation data to the server.
> ie. accept-language: en ja fr ...
lynx , w3m and Amaya brosers are also able to send this http/1.1 header, so
many users can use this functionality.
> There are language catalogs and documents translated to local languages,
> Swat select it and send to client.
I added the code to SWAT that parses "Accept-Language" header and returns
version of documents, and change languages of SWAT output messages used in
buttons, parameter names, etc. Users can easily get information in their
languages if there are trancelated data.
Adding new translated documents is easy. Just copy the document to
where language code is like ja, en, de.
I used gettext library to change the output messages of SWAT, so it is able
to add a new language
by adding the (language).po (called message catalog) file.
> see -> http://www.samba.gr.jp/project/samba-ja/index.html.en
> Now we are working about the portablity issue and integrating with
> Samba-2.2 branch.
> For the portability, we tested some implimantation as follows:
> 1. implemented in Samba-2.0.7-ja-1.0 to ja-1.3.
> this use configure to decide where to install catalog file and
> which method is good whether GNU gettext installed in OS or
> XPG4 catgets installed in the OS or GNU gettext bandled with Samba.
> it is confiured by ./configure --with-swat-i18n
> and with --with-catgets or --with-included-gettext or none.
> 2. implemented in Samba-2.0.7-ja-2.0(Now prepare for release)
> Especially, --with-catgets is less portable
> And there are so many codes handling catgets catalog.
> So We are working only supports the bandled library for portability.
> Now only --with-swat-i18n is needed.
Portability was the biggest problem. First I was going to use i18n library
on the OSes
such as GNU gettex, Sun gettext, XPG4 catgets interfaces, but they need
to change languages and locale data is very system dependent thing. That way
good for web application like SWAT. Many tests has done by SUGJ (samba users
and in Samba-2.0.7-ja-2.0, now SWAT supports GNU gettext only. It is
included in the archive of
samba-2.0.7-ja-2.0 and ready to compile. (we have Makefiles and configure
script for that).
This library has already been used in many platforms so I think it has a
samba-2.0.7-ja-2.0 release candidate version has been tested on Linux,
HP-UX11, and some other OS.
In this version, SWAT doesn't requires specific locale data to change
Now I'm making the patch for samba-2.2 and maybe work will done in about one
Maybe this patch will help non-english users, I hope.
How do you think about this?
// Ryo Kawahara
More information about the samba-technical