Re: long strings and xgettext.pl

[email protected] (Sava Chankov) Wed, 09 Nov 2005 16:35:13 +0200
Newsgroups perl.i18n
Message-ID <[email protected]>
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