scsi
01-14-2003, 10:54 AM
I'm setting up a multilingual site using phpLang.
It works fine for all site but not in this case..
site is structured with a db, but many options reside on flat files.
I must find a way to have those files multilingual.
actually I've this:
<?
$options = file("orientation.php");
$num_options = count($options);
print "<select size='1' name='orientation'>";
print "<option value='$orientation' selected>$orientation";
for ($i=0; $i<$num_options; $i++)
{
print "<option value='$options[$i]' ";
if (trim($orientation)== trim($options[$i]))
{
print "selected";
}
print ">$options[$i]</option>";
}
print "</select>";
?>
-- this select box fetch options contained in orientation.php
-------
content of orientation.php (called by select box):
<? echo (A) ?> ---- no works
(B) ---- no works
right
only third option works but it's no multilingual!!
-----
content of orientation.php (under language):
<?php
define("A", "right");
define("B", "left");
?>
I will be gratefull for your help
It works fine for all site but not in this case..
site is structured with a db, but many options reside on flat files.
I must find a way to have those files multilingual.
actually I've this:
<?
$options = file("orientation.php");
$num_options = count($options);
print "<select size='1' name='orientation'>";
print "<option value='$orientation' selected>$orientation";
for ($i=0; $i<$num_options; $i++)
{
print "<option value='$options[$i]' ";
if (trim($orientation)== trim($options[$i]))
{
print "selected";
}
print ">$options[$i]</option>";
}
print "</select>";
?>
-- this select box fetch options contained in orientation.php
-------
content of orientation.php (called by select box):
<? echo (A) ?> ---- no works
(B) ---- no works
right
only third option works but it's no multilingual!!
-----
content of orientation.php (under language):
<?php
define("A", "right");
define("B", "left");
?>
I will be gratefull for your help