yami007 Posted October 31, 2009 Share Posted October 31, 2009 this is my test page : <?php if(isset($_GET['lang'])) { if($_GET['lang'] == "en") { require_once("languages/lang-en.php"); } elseif($_GET['lang'] == "fr") { require_once("languages/lang-fr.php"); } elseif($_GET['lang'] == "ar") { require_once("languages/lang-ar.php"); } } else { require_once("languages/lang-fr.php"); } ?> <html> <head> <title><?php echo $lang['title']; ?></title> </head> <body> <div id="content"> <h1><?php $lang['title']; ?></h1> <?php $lang['content']; ?> <br/> </div> <div id="footer"> <?php $lang['footer']; ?> </div> </body> </html> and here is my included file : <?php // english version $lang = array(); $lang['title'] = "Welcome to My site !"; $lang['content'] = "<p>Well this is my first time setting up a multilingual website, i hope it works.</p>"; $lang['footer'] = "All rights reserved for UML (C) ".date("Y", time()); $lang['error'] = "Sorry, you cannot add words unless you're logged in !"; ?> the problem is that page displays the head title only !!!! what should i do??? Link to comment https://forums.phpfreaks.com/topic/179731-problem-with-array-multilingual-page/ Share on other sites More sharing options...
Yesideez Posted October 31, 2009 Share Posted October 31, 2009 You're forgetting to use ECHO to display the rest of the data - you're only using it for the title! Link to comment https://forums.phpfreaks.com/topic/179731-problem-with-array-multilingual-page/#findComment-948306 Share on other sites More sharing options...
yami007 Posted October 31, 2009 Author Share Posted October 31, 2009 should i hit my head against the wall??? Link to comment https://forums.phpfreaks.com/topic/179731-problem-with-array-multilingual-page/#findComment-948307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.