Re: Re: Sqwebmail roadmap

Marcin Owsiany <[email protected]>
Newsgroups gmane.mail.sqwebmail
Message-ID <[email protected]>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.