Re: [SMARTY] template dir and many files with the same name

From: Date: Mon, 12 Jan 2004 11:09:11 +0000
Subject: Re: [SMARTY] template dir and many files with the same name
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10810@lists.php.net to get a copy of this message
How about some thing like this: // verify the cookie, querystring, or wherever language // selection comes from and store in a variable $language = 'english'; $tpl->template_dir='/templates/'.$language.'/'; or $tpl->template_dir='/templates/'; $tpl->display($language.'/contact.tpl'); olinux --- sebab@dialcom.com.pl wrote: > Hi all, > > I'm making multilingual site and my first idea was > to put files in > directory structure like that: > /templates/english/ > /templates/russian/ > > and so on and then in PHP files to set > $tpl->template_dir to these > subfolders but $tpl->compile_dir for always to one > folder. > > And that was bad idea - /english/contact.php and > /russian/contact.php > was using the same compiled template file . Do I > have to use the same > "root" template dir in whole site? I think so.. > > Finally I set $tpl->template_dir="...../templates" > and then used > templates like that > $tpl->display("english/contact.tpl"); > > instead of > > $tpl->display("contact.tpl"); > > Anybody else encountered that? > > Greetings! > SeBa > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus

« previous php.smarty.general (#10810) next »