da capo Posted December 16, 2007 Share Posted December 16, 2007 Hey guys I've got my page with a language script, so if they go to vt16.com it sets to english language, .se swedish etc. But which variable or session do i need to change, in order to change the language for WHMCs too? I've read a bit on the forum and tried this but it doesn't work: <? if($language == "en") $_SESSION["Language"] = "English"; if($language == "da") $_SESSION["Language"] = "Danish"; if($language == "se") $_SESSION["Language"] = "Swedish"; if($language == "no") $_SESSION["Language"] = "Norwegian"; ?> i could update the users language in the database too, but if they aren't logged in this wouldn't work. 0 Quote Link to comment Share on other sites More sharing options...
totomcs Posted October 10, 2008 Share Posted October 10, 2008 .................... 0 Quote Link to comment Share on other sites More sharing options...
totomcs Posted October 10, 2008 Share Posted October 10, 2008 <HEAD> <SCRIPT LANGUAGE="JavaScript1.2"> <!-- Begin if (navigator.appName == 'Netscape') var language = navigator.language; else var language = navigator.browserLanguage; if (language.indexOf('en') > -1) document.location.href = 'cart.php?language=English'; else if (language.indexOf('nl') > -1) document.location.href = 'cart.php?language=Nederlands'; else document.location.href = 'cart.php?language=English'; // End --> </script> </head> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.