Re: if statements
| From: | Andrei Zmievski | Date: | Tue, 15 Feb 2000 22:15:46 +0000 |
| Subject: | Re: if statements | ||
| References: | 1 2 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-58@lists.php.net to get a copy of this message | ||
On Tue, 15 Feb 2000, Dan Libby wrote:
> I think ifs are somewhat evil. The same could be done with:
>
> Your search found {products_total} {match_plural}.
>
> Thus, the plurality logic remains in the PHP code. One argument against
> this is that it does not internationalize well.
> I don't have a good answer for that offhand.
Internationalization is another good point. That's why I don't think any
HTML/text should come from the PHP business logic - it should come from
either the config file or the template itself. Then it's easier to port
to different languages.
-Andrei
* We reason deeply, when we forcibly feel. *