Re: [SMARTY] translations
| From: | Monte Ohrt | Date: | Mon, 01 Jul 2002 20:39:29 +0000 |
| Subject: | Re: [SMARTY] translations | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5139@lists.php.net to get a copy of this message | ||
There probably isn't a way to do it "best", it depends on your needs. For our (simple) purposes we use config files.
example:
lang_en.conf
lang_fr.conf
lang_de.conf
lang.conf -> lang_en.conf
We symlink the desired language file and load that in the templates. If you need multiple languages available (site frontends), you could use a cookie or session variable to keep track of which language file to use.
The only thing we have in our language files is button/link names and short blurbs of text. If you want to maintain multi-languages for all the content of a site, something a bit more sophisticated may be in order, more than just Smarty.
Monte
Robin Ericsson wrote:
Hi, I've been searching the archives, and found several ways of doing translations and have a site translated into different languages. The way I was thinking was using config file, but the pre-filter seemed nice as well, so I'm att little double-minded. Are there any "official" thoughts on this, or should each person use what the application demands :) best regards Robin