* Thus wrote daniel hahler ([EMAIL PROTECTED]):
> Hello listmembers,
> 
> I'm building up a site which should be german and english. So I have a
> site object which remembers this choice during the session and do a
>    include('lang_'.$site->lang.'.php');
> in my topmost.php.
> 
> This works good, but this file is growing and I thought about how to
> handle this.
> 
> Two things came in mind:
> 1. Split the content parts and use a different include file for each
> section.
> 2. Do a switch ($site->curMenu) in the lang_xx.php and define only
> what is needed for current section.


> 
> The first option is not so good, as I would have up to 10 new files.
> And when thinking of the second option, I thought that it could be
> even more performant, if you had a static included file, as this could
> be cached somehow.
> 
> So, what to do?
> 

I would suggest using gettext it will make the application real
flexible. I havn't used it but from what I've seen it really is
simple to use. Plus it keeps your translations completely seperate
from your program.

http://php.net/manual/en/ref.gettext.php


> And: hello to all, it's my first post here. :)

Hello and Welcome.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to