Re: [SMARTY] best way to handle error messages?

From: Date: Sun, 15 Dec 2002 16:30:25 +0000
Subject: Re: [SMARTY] best way to handle error messages?
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6812@lists.php.net to get a copy of this message
This is how I do it: keep them in a config file like lang_en.conf, lang_de.conf, etc. and symlink lang.conf to the language of choice. Then load lang.conf from the app and assign to $error_msg. Then the template just knows whether to show an error or not. If you need the languages more dynamic, skip the symlink and load the proper config file from the app. Monte Paul Lockaby wrote:
Monte Ohrt wrote:
keep your template simple, like this: {if $error_msg ne ""} {$error_msg} {/if} Let the application logic do the rest.
Ok. What is the best way to keep all language specific elements out of my php code in a case like this? Again, I want this thing to be easily translateable.


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