Language, include problem

Gesperrt
djavet
Beiträge: 264
Registriert: Do 22. Jan 2004, 11:31
Kontaktdaten:

Language, include problem

Beitrag von djavet »

Hello,

I discover your wonderful CMS... Whahahaou!

Here's my problem:
I'wish to include a portfolio into the CMS:
-> http://www.metadelic.com/dev/contenido/ ... p?idcat=21

I use a new module with:

Code: Alles auswählen

<?php include('portfolio/test.php'); ?>
All is woorking well and you can navigate trough.

The next step is to fill some info with a language file:

Code: Alles auswählen

<?php
   if ($changelang=='1') {
       include('portfolio/lang/fr-lang.php');
       $lang = "Français";
   }

   elseif ($changelang=='3') {
     include('portfolio/lang/en-lang.php');
     $lang = "English";
   }

   else {
     include('portfolio/lang/fr-lang.php');
     $lang = "Français";
   }
?>

<?php echo TXT_CONSEIL_INDEX; ?>
.... and I receive a error:
The login screen with username "Nobody".

What is wrong with my code?

Many thx in advance for your help and time,
Dominique Javet
timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag von timo »

don't set the $lang variable. It is internally used by contenido. Better query the $lang variable itself (as it will contain whatever you set $changelang to).
djavet
Beiträge: 264
Registriert: Do 22. Jan 2004, 11:31
Kontaktdaten:

Beitrag von djavet »

Me -> :D

Thx a lot, it's evident and a common tag!
Wonderful cms!

Regards, Dom
Gesperrt