Ok, following some requests I have hacked together some basic language
support. (Checked into ui_branch in cvs) This works as follows:

The CGIs use, (or will use - I've only done one or two so
far) Locale::gettext to provide a perl wrapping to GNU gettext stuff. 
(You can get this from CPAN, or for convenience at
http://www.nottingham.ac.uk/~enxrah/gettext-1.01.tar.gz )

Obs::Html looks at HTTP_ACCEPT_LANGUAGE, and sets the locale to the first
item in this list. This means you either get your first language or the
defaults. Sorry. Although I assume that gettext can cope with variants.

The translations source files are kept in the po directory, and as I can't
get my head around this hyper-complex Makefile business (help me
please!) are installed manually (perhaps using the simple bash script
po/install.sh that I wrote).

In order to test it out, I created an es.po and de.po file, and used
babelfish to translate some words and phrases. So far there is only the
alt texts and the search page with anything translated.

Let me know if there are any problems with this or with this approach.


Rob

p.s. I volunteer to do the en_GB translation.

-- 
           _____
          /    /\               Robert Hart
         /    /  \              [EMAIL PROTECTED]
        /    /    \             http://www.nott.ac.uk/~enxrah
       /    /  /\  \      
      /    /  /  \  \           15 Benington Drive
     /    /  /\   \  \          Wollaton
    /    /  /  \   \  \         Nottingham
   /    /__/____\   \  \        NG8 2TF
  /              \   \  \
 /________________\   \  \      0115 9283660
 \_____________________\ /

_______________________________________________
Obs-dev mailing list
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/obs-dev

Reply via email to