PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > embedded php in a template...
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
embedded php in a template...

Réponse
 
LinkBack Outils de la discussion
Vieux 14/05/2006, 16h23   #1
D_C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut embedded php in a template...

hi list -

seems there is a GNU extension for handling text translation strings...

is there a high-performance way to call out to this from within smarty
templates?
eg inside a template i need to call php.

instead of
--------
name: {$userName}

all i can immediately think of is passing in a php object to smarty
that can access the gettext function... but this takes a lot of space
+ I'm sure has call overhead:

{$phpObj->getText("name")} {$userName}

is ther a way to do a smarty filter that you can pass in a string (not
a variable) to ?

{ "userName"|getText }

i cant really think of a good way of combining smarty + php ...

tx,

/dc
_______________________________________________
David "DC" Collier

dc@pikkle.com
skype: callto://d3ntaku
http://www.pikkle.com
+81 (0)80 6521 9559

http://charajam.com$B!!!Z!z%-%c%i"v%8%c%`!z![(B
$B?M5$%-%c%i$H(BJ-POP$B:G?7%R%C%H6J$r<+J,$GAH$_9g$o$;$F(B
$BBT<u(BFlash$B$dCe(BFlash$B$r:n$C$A$c$*$&!* (B
_______________________________________________
  Réponse avec citation
Vieux 14/05/2006, 17h04   #2
Jocelyn Legault
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] embedded php in a template...

For translation, you could have a look at:

http://code.jellycan.com/langselect/

It's a really nice transaltion plugin for Smarty.

On 5/14/06, D_C <dc@pikkle.com> wrote:
>
> hi list -
>
> seems there is a GNU extension for handling text translation strings...
>
> is there a high-performance way to call out to this from within smarty
> templates?
> eg inside a template i need to call php.
>
> instead of
> --------
> name: {$userName}
>
> all i can immediately think of is passing in a php object to smarty
> that can access the gettext function... but this takes a lot of space
> + I'm sure has call overhead:
>
> {$phpObj->getText("name")} {$userName}
>
> is ther a way to do a smarty filter that you can pass in a string (not
> a variable) to ?
>
> { "userName"|getText }
>
> i cant really think of a good way of combining smarty + php ...
>
> tx,
>
> /dc
> _______________________________________________
> David "DC" Collier
>
> dc@pikkle.com
> skype: callto://d3ntaku
> http://www.pikkle.com
> +81 (0)80 6521 9559
>
> http://charajam.com $B!Z!z%-%c%i"v%8%c%`!z![(B
> $B?M5$%-%c%i$H(BJ-POP$B:G?7%R%C%H6J$r<+J,$GAH$_9g$o$;$F(B
> $BBT<u(BFlash$B$dCe(BFlash$B$r:n$C$A$c$*$&!* (B
> _______________________________________________
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 15h53.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,88718 seconds with 10 queries