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]
|