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 > smarty + translations + performance
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
smarty + translations + performance

Réponse
 
LinkBack Outils de la discussion
Vieux 13/05/2006, 23h04   #1
D_C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut smarty + translations + performance

hiya -

we're doing a site that will be in multilanguages, something i'm sure
smarty has often been used for.

how does smarty work with caching templates, and when does it
re-compile templates?

i -guess- with smarty there are two levels - the template is compiled
and this "compiled template" is what is then used in future to produce
final pages, is this correct?

so eg if i have:

{config_load file=$ui.langStringsFile }

where the *config filename itself* is set by my app eg "strings_ja" or
"strings_en"

- is smarty able to know when the value of that variable has changed,
and not compile the templates again?

or do i have to setup this type of caching myself manually? eg as long
as the user doesnt switch languages, dont cache...


are there any tips or good examples for approaches to this?
(the "SmartestSmartyMultilanguageSupport" source seems to use the GnU
gettext extension which is a bear to get working apparently, so going
to skip that one...)

thanks!

--
_______________________________________________
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 15/05/2006, 15h17   #2
Monte Ohrt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] smarty + translations + performance

config files are compiled, and get recompiled if they change (unless you
have compile_check turned off)

caching will cache the output generated by display() or fetch(),
regardless of what was used to create the content (multiple templates,
configs, etc.)

D_C wrote:
> hiya -
>
> we're doing a site that will be in multilanguages, something i'm sure
> smarty has often been used for.
>
> how does smarty work with caching templates, and when does it
> re-compile templates?
>
> i -guess- with smarty there are two levels - the template is compiled
> and this "compiled template" is what is then used in future to produce
> final pages, is this correct?
>
> so eg if i have:
>
> {config_load file=$ui.langStringsFile }
>
> where the *config filename itself* is set by my app eg "strings_ja" or
> "strings_en"
>
> - is smarty able to know when the value of that variable has changed,
> and not compile the templates again?
>
> or do i have to setup this type of caching myself manually? eg as long
> as the user doesnt switch languages, dont cache...
>
>
> are there any tips or good examples for approaches to this?
> (the "SmartestSmartyMultilanguageSupport" source seems to use the GnU
> gettext extension which is a bear to get working apparently, so going
> to skip that one...)
>
> thanks!
>

  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 19h38.


É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,08325 seconds with 10 queries