develooper Front page | perl.i18n | Postings from November 2005

Re: long strings and xgettext.pl

Thread Previous | Thread Next
From:
Sava Chankov
Date:
November 9, 2005 08:44
Subject:
Re: long strings and xgettext.pl
Message ID:
20051109143514.24259.qmail@lists.develooper.com
Guido Flohr wrote:
> You should give the standard C version of gettext a try.  Beginning
> with version 1.12 GNU gettext supports Perl, and it recognizes almost
> all string types that Perl knows, for example:
> 
> print _<<EOF; If you ... A message ... If you ... EOF
> 
> Just try "xgettext yourscript.pl YourModule.pm ..."

Thanks, GNU xgettext did the job! It even warned me about invalid variable interpolations in gettext() calls.

> Still BTW, it is generally a bad idea to use a single underscore as
> an alias for gettext().  That function is automatically global.

I don't understand neither why a name of underscore makes a function automatically global nor why is it a bad idea gettext() to be global. Could you please explain?

all the best,
Sava Chankov

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About