On Thu, Oct 6, 2011 at 11:06 AM, André Walker <an...@andrewalker.net> wrote:

> I don't know if it helps, but I've been researching a little about
> localization recently, and I came across this article:
> http://rassie.org/archives/247
>
> In summary, it states Locale::Maketext shouldn't be used — we should be
> using Locale::TextDomain instead. I'm considering it for my current needs.
>
> Any thoughts?
>

The article is rather biased -- it points out the speck in Maketext's eye
while ignoring gettext's planks.  The author of the article is so bent on
how gettext does things that he fails to recognize that at least some of
what Maketext does is actually an improvement.  It reads a lot more like
"gettext is The One True Way; Maketext is different; therefore, Maketext is
Considered Harmful".

gettext was very much built for translating locally-running applications,
and makes a lot of assumptions that simply aren't true in a web
environment.  One thing about gettext that makes it untenable for web
applications is its reliance on POSIX setlocale() and environment variables
to set itself up, a design flaw that Locale::TextDomain tragically
reproduced to perfection, gauging from the documentation.  Take a look at
these hoops PHP developers jump through to utilize gettext:

http://fplanque.net/Blog/devblog/2003/08/20/internationalizing_web_applications_usin

It should induce pain in any sane developer.  Hint: if you are having to set
environment variables halfway through your application to configure
something, your design is beyond broken.  Now, PHP has Zend_Translate to
rescue them from this horror, but almost no one will utilize it because the
above kind of cargo-cult hackery is par for the course in PHP.

Perl has already been rescued from this, hint hint.

The other thing that really irks me is that Locale::TextDomain hasn't had an
update since 2009.  Open bugs on rt.cpan from 2 years ago.  Not a fan of
such a crucial underlying library being abandonware.  Maketext, for all its
warts, at least still appears to have a maintainer.

Plus, there are still untapped regions of the l10n universe --
gender-specific verb endings in Russian, anyone?  This is a realm that
gettext doesn't even begin to address.  I have some betting money on which
system will address it first.

Now, the article has some valid points about how Maketext does it wrong
(like not being able to handle a verbatim gettext PO), so let's fix
Maketext.  gettext is a step backwards in the modern Perl world.

-- 
Stephen Clouse <stephenclo...@gmail.com>
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to