Seite 1 von 1

Language, include problem

Verfasst: Do 22. Jan 2004, 12:42
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

Verfasst: Do 22. Jan 2004, 13:04
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).

Verfasst: Do 22. Jan 2004, 13:37
von djavet
Me -> :D

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

Regards, Dom