steadicamop
07-26-2007, 10:22 AM
Hey guys, I'm just getting into PHP and have started on a site for someone, it will be dual language, and this is what I have so far:
<?php
if(isset($_GET['lang']))
if($lang == "en") { ?>
<div align="center">
<p align="justify">English Text</p>
</div> </div>
<?php
}
else if($lang == "nl")
{ ?>
<div align="center">
<p align="justify">Dutch Text</p>
</div></div>
<?php } ?>
Now, I'm using index.php?lang=en or lang=nl for each one, but I can figure out where I'm going wrong - when the page loads there is no text, I want it to default to Dutch - how do I achieve this? I thought I knew how but it wouldn't work.
Is there any other easier way of achieveing this as well? I thought this was the easiest way I could find.
Cheers
Jason
<?php
if(isset($_GET['lang']))
if($lang == "en") { ?>
<div align="center">
<p align="justify">English Text</p>
</div> </div>
<?php
}
else if($lang == "nl")
{ ?>
<div align="center">
<p align="justify">Dutch Text</p>
</div></div>
<?php } ?>
Now, I'm using index.php?lang=en or lang=nl for each one, but I can figure out where I'm going wrong - when the page loads there is no text, I want it to default to Dutch - how do I achieve this? I thought I knew how but it wouldn't work.
Is there any other easier way of achieveing this as well? I thought this was the easiest way I could find.
Cheers
Jason