gettext and variable parsing

"Ramil Sagum" <[email protected]>
Newsgroups gmane.comp.php.internationalization
Message-ID <[email protected]>
i've successfully setup internationalization, however, i have problems with
variable parsing :

how do you make this work?


$from = 10;
$to = 15;
$total = 25;
echo _("Displaying records from $from to $to of $total");

I know that the expression  "Displaying records from $from to $to of $total"
gets parsed first into "Displaying records from 10 to 15 of 25" before being
passed to gettext. So when gettext looks it up in the .mo files, it doesn't
see the appropriate string. However, if I do

echo _('Displaying records from $from to $to of $total');

it gets translated alright, but the values of $from, $to and $total don't
get parsed. Is there any way other than doing a replace (say, replace $from
with '5'..etc)

thanks!


ramil


-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.