You are here: Re: Too match text I think. « All PHP « IT news, forums, messages
Re: Too match text I think.

Posted by peter on 10/13/06 16:48

>> For example if you have french, english and german you may have 3
>> files called:-
>>
>> lang_de.php
>> lang_en.php
>> lang_de.php
>
> Totaly wrong
>
>> if($_SESSION['lang'] == 'de')
>> {
>> require_once('lang_de.php')
>> }
>> elseif($_SESSION['lang'] == 'fr')
>> {
>> require_once('lang_fr.php')
>> }
>> else
>> {
>> require_once('lang_en.php')
>> }
>>
>
> No sense
>
>
> He should to use only ONE FILE - no more!
>
> and just put in separated data to this file
>

just vbecause it is not the way you do it does not make it totally wrong. In
php there are many ways to achieve the same end result and the methosd I
posted is an easy way to achieve multiple languages.

If it makes no sense how come it is the method for many php applications
such as phpBB, phpnuke vbulletin (up until v3). These are just a few of
many,many applications that use this method!

 

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

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