Some questions about Smarty ...
| From: | Edouard Nojaroff | Date: | Sun, 26 May 2002 17:05:34 +0000 |
| Subject: | Some questions about Smarty ... | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-4398@lists.php.net to get a copy of this message | ||
First of all, thanks to Monte and Andrei for such a great and powerful tool..
I love it !
I'm trying to use Smarty for an e-commerce site, and I have some questions :
Multi-language.
Does someone have any suggestions about how to implement multi-language
feature with Smarty?
I thought storing the text in config files, with one directory per language..
Config_dir could be changed on the fly, according to the language selected
by the user. That way, it¹s easy for the template designer to change the
text of the templates. May be there is a better way to do that...
Caching
Smarty documentation says there are 2 optional parameters to the display
method : cache_id and compile_id. I don¹t understand well when to use them.
I think it would be useful in case of multi-language feature, since the same
page can generate different outputs. Do I have to pass the language as
cache_id, or compile_id?
³Componentized templates²
I like the idea to link template and code together. I made some templates,
such as navigation menu or shopping cart display, that can be used by
template designer without any PHP knowledge. But I have some problem when I
include the same componentized template more than once in the same template..
With Smarty 2.0 it works well, but with version 2.1.1 it works only on the
first call (insert). Embeded PHP code is no more executed after that. Is it
a bug of the last version?
Thanks for any help.
---
Edouard