Re: [poedit-users] php string variables in gettext

"Samy Rabih" <[email protected]> Fri, 28 Aug 2009 17:24:08 +0200
Newsgroups gmane.editors.poedit.user
Message-ID <[email protected]>
The problem is the following : _($foo) means the value of $foo is not
predictible. Is it a value between a range of values ? is it dynamic text ?

 

De : - Simon - [mailto:[email protected]] 
Envoyé : vendredi 28 août 2009 17:20
À : [email protected]
Objet : [poedit-users] php string variables in gettext

 

Hello,

How does gettext translate string variables? It doesn't seem to want to do
it.. lets say I have $sentence = "Hello World"; and then I want to echo
_($sentence); ... how can I do that so that I can translate what's inside
$sentence in Poedit?I can use -> echo sprintf(_("%s test"), $sentence) and
this will print "Hello World test" in the browser but it will appear as "%s
test" in Poedit and I won't get the translated version of Hello World inside
of Poedit. So how can I use string variables inside Poedit? Thanks!

Simon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users