You are here: Re: Multilanguage website « PHP Programming Language « IT news, forums, messages
Re: Multilanguage website

Posted by Jerry Stuckle on 07/10/05 17:24

petermichaux@yahoo.com wrote:
> I am doing exactly what Jerry suggested
>
> in "index.php" I have something like the following. (this isn't tested
> because really I have it spread out through a few files.)
>
> <?php
>
> session_start();
>
> define("DEFAULT_LANGUAGE", 'ge');
> define("SITE_ROOT", dirname(__FILE__));
>
> if ( !isset($_SESSION['Language']) )
> {
> $_SESSION['Language'] = DEFAULT_LANGUAGE;
> }
> require_once(SITE_ROOT."/languages/".$_SESSION['Language']."/language.php");
>
> ?>
>

Why confuse things with SITE_ROOT? If you want the server's root directory,
$_SERVER['DOCUMENT_ROOT'] gives it to you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация