newbie question
| From: | Gert Van den Eynde | Date: | Tue, 28 Jan 2003 15:22:42 +0000 |
| Subject: | newbie question | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7361@lists.php.net to get a copy of this message | ||
Hello everybody,
I'm just learning to use Smarty for our project website. And of course, I have some design
questions ;-)
The website is to be three-lingual (English, French, Dutch). A page would have a header, a footer, a
navigation part on the left (a simple menu) and the main content area (classical layout). All these
parts have a version in each language, i.e. there is a French, Dutch and English menu.
What I intended to do was to create for each 'real' page a .php file that would
instantiate a Smarty object using a main template. The language would be a variable in the Smarty
object. There would be three subdirs (en,fr,nl) which contain the content for each page. I would
then have the template file read in the content (based on the current file name) in the correct
language, the menu in the correct language, etc. For example if a visitor wants home.php in English,
the content would be read from en/home.html (or en/home.php).
Is this a good way to proceed? Or is there a cleaner way? What about caching?
Thank you for your help,
Gert