develooper Front page | perl.i18n | Postings from October 2003

Re: xgettext and parameter reordering

Thread Previous | Thread Next
From:
Guido Flohr
Date:
October 6, 2003 08:44
Subject:
Re: xgettext and parameter reordering
Message ID:
3F818E70.1090907@imperia.net
Christophe Chisogne wrote:
> printf(_("I have %1$d houses and %2$d euros"), 2, 2500)

Just for the records: Using "_" as the function name for gettext() has 
two possibly negative effects:  The function will be globally visible 
which is a not so obvious side effect.  I can't remember where this is 
documented but I think the exact rule is that symbols the names of which 
consist of one single non-alphanumeric characters are always global.

Furthermore - as far as I remember - the underscore is the candidate for 
the concatenation operator (replaces the dot) in the future Perl 6.

For both reasons, I have decided to use a double underscore as a 
shorthand to gettext() in libintl-perl.

Ciao

Guido
-- 
Imperia AG, Development
Leyboldstr. 10 - D-50354 Hürth - http://www.imperia.net/


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