Re: help with xgettext and here-docs

From: Date: Tue, 31 Jul 2001 05:59:13 +0000
Subject: Re: help with xgettext and here-docs
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-176@lists.php.net to get a copy of this message
Hi Colin, xgettext finds strings based on quotation - AFAIK you can't use heredoc syntax. --zak Colin Viebrock wrote: > First off, I'm new to i18n and gettext ... but I think it will serve my > needs. So, imagine this php script: > > <?php > > echo _( <<< EOF > It's a great day! > EOF > ); > > ?> > > When I run "xgettext file.php" on it, I get warnings about "unterminated > character constant" ... which I assume is the single quote in "it's". > > Is there a way around this? Or am I hoping for too much trying to use > gettext and here-docs together? > > Also, how do I tell xgettext to only look for strings inside _( ... ) > blocks? As it is, it will flag things like the SRC attribute in image tags, > HREF in link tags, etc. (anything in quotes, I think). > > Thanks in advance!

« previous php.i18n (#176) next »