[imp] IMP and MOTD.html

Eric Jon Rostetter eric.rostetter@physics.utexas.edu
Fri, 13 Oct 2000 13:25:10 -0500 (CDT)


Quoting Ari Heikkinen <aheikin@phaser-atm.pspt.fi>:

> > I didn't ask, I just did it. :-) For the php-challenged, either of

I'm sure the people who needed it thank you.  

However, wouldn't a better design use "include" files, one for
each language?  In other words, you could create a motd file
in the locale directories for each language, and then the main
MOTD file would include the proper one -- something like:

<?php if isset($language) { include "locale/$language/motd" }
else include "locale/en/motd" } ?>

Not sure if you would use include or require, probably want
to use $default->include_dir or something like that for the
path, and other details in reality.  The above is just more
a demonstration of concept rather than proper working code...

Just a thought...
 
> > ------8<----- cut here ------8<-----
> > <?php if ($language == "fr") { ?>
> > 
> > Ceci n'est pas un MOTD.
> > 
> > <?php } elseif ($language == "de") { ?>
> > 
> > Dieses ist nicht ein MOTD.
> > 
> > <?php } elseif ($language == "it") { ?>
> > 
> > Ci&ograve; non &egrave; un MOTD.
> > 
> > <?php } else {  # default case ?>
> > 
> > This is the MOTD.
> > 
> > <?php } ?>
> > ------8<----- cut here ------8<-----
> 
> Works like a charm, thanks!
> 
> >   -Rich
> 
> Ari Heikkinen - PSPT <e-mail: aheikin@dlr.pspt.fi>
> 
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 



Eric Jon Rostetter
The Department of Physics
The University of Texas at Austin
Austin, Texas 78712-1081

Office:    RLM 7.126
Telephone: 512-471-5821
Email:	   eric.rostetter@physics.utexas.edu