List Info

Thread: smarty + translations + performance




smarty + translations + performance
user name
2006-05-13 21:04:35
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

dcpikkle.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

smarty + translations + performance
user name
2006-05-15 13:17:28
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!
>

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )