Hi,

I'll directly parse the string to permit to have all parameters,
so I have only one question about the PHPTAL_TranslationService :

How is it possible, into the translate() function of
PHPTAL_TranslationService,
to get the content of the current tag ?

For example :
<span i18n:translate="welcome">Hi !</span>

I would like found the "Hi !" string.

Thanks a lots.


Le mercredi 23 avril 2008 à 19:21 +0200, Guillaume Lecanu a écrit :

> Hi,
> 
> No ideas about theses questions ?
> 
> 
> Le mardi 22 avril 2008 à 22:34 +0200, Guillaume Lecanu a écrit :
> 
> > Hi,
> > 
> > Thanks for this project, this seems very interesting.
> > 
> > I'm trying to adapt my framework to uses your templates engine with
> > my translations text system.
> > 
> > But I have some problems to adapt it like I want to uses it.
> > 
> > Some translations have arguments, and so the syntax I want to have
> > is this one :
> > 
> > <span i18n:translate="welcome $user/name $nbNewMessages">Welcome
> > John Doe, you have 3 messages !</span>
> > 
> > 'welcome' is the key of my translations hashtable.
> > $user/name is the 1st argument required for this translation
> > $nbNewMessage is the 2nd argument required for this translation.
> > 
> > But the translate($key) function receive only one argument.
> > There is a way to permit to receive others arguments ?
> > 
> > 
> > Another question, is it possible to retrieve the current sample
> > texte found in the template (Welcome John Doe ... ) ?
> > This will be very helpful in my case.
> > 
> > And a last question, how can we translate an attribute ?
> > For example I want to translate 'Send' : <submit name="submit"
> > value="Send" />
> > 
> > 
> > Thanks a lots for your help ! 
> > 
> > _______________________________________________
> > PHPTAL mailing list
> > PHPTAL@lists.motion-twin.com
> > http://lists.motion-twin.com/mailman/listinfo/phptal
> 
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to