Re: [SMARTY] Dynamic Constants (config)

From: Date: Thu, 27 Feb 2003 08:56:52 +0000
Subject: Re: [SMARTY] Dynamic Constants (config)
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8245@lists.php.net to get a copy of this message
No hints on this topic? On Wednesday 26 February 2003 13:41, Hinrich Donner wrote: > Hi, > > I like to use the config_load for a multi language feature. To handle this > in some special cases (e.g. error messages), I'm looking for a possibility > to join a variable and a constant, for example: > > {if $error_code neq 0} > <span class="error"> > <h1>{#ERROR_TITLE#}</h1> > <p>{#ERROR_TEXT_$error_code#}</p> > </span> > {/if} > > In that example the error code has an integer value. In the config file > the constants are defined for example: > > ERROR_TITLE="Error" > ERROR_TEXT_1="File not found." > ERROR_TEXT_2="Fille access not allowed." > ERROR_TEXT_3="Foo your bar." > > [de] > ERROR_TITLE="Fehler" > > I hope, you understand what I like to do. > > Thanks for any help > Hinrich -- Hinrich Donner

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