On Mon, Apr 19, 2004 at 06:51:54PM -0400, Sam Varshavchik wrote:
> Marcin Owsiany writes:
> 
> >I know that gettext seems a bit complicated at first, but it's worth
> >learning and using, despite all its shortcomings.  Once you get a way to
> >extract the strings with xgettext, gettext tools will take care of
> >almost everything else.
> 
> gettext is fine, except that it does not fit in sqwebmail's model, where 
> all language-dependent strings are already externalized into separate files.

The model in which you do:  printf(_("blah blah"));  is just one
(oldest) way of using gettext. See for example the Debian web pages
(www.debian.org), which are translated to many languages.

They are generated by a HTML generation toolkit called WML, which is
basically a HTML preprocessor with embedded perl, and other nice things.
The process is as follows:
 - the webmasters mark the strings in with <gettext>blah</gettext> tags
   in the web page source (.wml files) 
 - the strings are extracted to "pot" files with xgettext
 - translators translate the "pot" files to "po" files
 - "po" files are compiled to "mo" files
 - when the website is generated (.wml -> .html), WML replaces strings
   in gettext tags with translated strings from "mo" files

So it works much in the same way as you described in your next post.

Marcin
-- 
Marcin Owsiany
[EMAIL PROTECTED]

Reply via email to