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!
>
|