[PHPTAL] PHPTAL_TranslationService questions
Guillaume Lecanu
Guillaume at lya.fr
Tue Apr 22 22:34:43 CEST 2008
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 !
-------------- section suivante --------------
Une pièce jointe HTML a été enlevée...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20080422/4b8d530b/attachment.htm
More information about the PHPTAL
mailing list