Re: [poedit-users] Fwd: gettext localize strings with variables
Vasóczki Ferenc <[email protected]> Thu, 28 Jul 2011 16:52:11 +0200
| Newsgroups | gmane.editors.poedit.user |
|---|---|
| Message-ID | <[email protected]> |
Use this:
printf _('This is %s a translatable string.', OUHH)
I think OUHH is a constant.
Check printf, and srpintf from PHP manual.
Vas=F3
> -----Original Message-----
> From: Werner F. Bruhin [mailto:[email protected]]
> Sent: Thursday, July 28, 2011 4:21 PM
> To: [email protected]
> Subject: Re: [poedit-users] Fwd: gettext localize strings with
> variables
> =
> Peter,
> =
> On 07/28/2011 03:38 PM, Peter Irbizon wrote:
> > Hello,
> > I have
> > variable OUHH and
> >
> > print _('This is %(OUHH)s a translatable string.' % locals())
> >
> > how can I translate this ? thanks
> You want to translate the content of the variable "OUHH"? If yes,
> where
> is it coming from?
> =
> gettext/poEdit will allow you to translate all of the above except the
> "%(OUHH)s".
> =
> Werner
> =
> =
> -----------------------------------------------------------------------
> -------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> Poedit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/poedit-users
---------------------------------------------------------------------------=
---
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey