rilana Posted October 12, 2007 Share Posted October 12, 2007 Hi Everybody Please help, I am doing a webpage with two different languages. So I have a folder 'english' with all the files and a folder 'deutsch' with the same files called the same names. In the english navigation I have a button where I can choos the same page but in german. And I know there is a way to switch the root folder but still link to the same file..... I dont know if you understand what I mean but I found some kind of code, but just dont know how to get it to work.... switch($_REQUEST['language']) { case 'englisch': HEADER(Location:/english'); break; case 'deutsch': HEADER(Location:/deutsch'); } Does anyone here know what I am talking about and any clue on how I could solve this problem??? I would realy aprechiate your help. Thanks a lot.... ??? Quote Link to comment https://forums.phpfreaks.com/topic/72918-switch_requestlanguage/ Share on other sites More sharing options...
zgkhoo Posted October 12, 2007 Share Posted October 12, 2007 http://www.phpfreaks.com/forums/index.php/topic,162825.msg713380.html#msg713380 Quote Link to comment https://forums.phpfreaks.com/topic/72918-switch_requestlanguage/#findComment-367740 Share on other sites More sharing options...
zgkhoo Posted October 12, 2007 Share Posted October 12, 2007 http://www.askbee.net/articles/php/MultiLanguage_Website/multilanguage_dynamic_website.html http://www.phpbuilder.com/snippet/download.php?type=snippet&id=1378 Quote Link to comment https://forums.phpfreaks.com/topic/72918-switch_requestlanguage/#findComment-367756 Share on other sites More sharing options...
MasterACE14 Posted October 12, 2007 Share Posted October 12, 2007 If you want to use a switch statement, you can make it include whatever files you want. <?php switch($_REQUEST['language']) { case 'english': include_once('/englishfile.php'); break; case 'deutsch': include_once('/deutshfile.php'); } I don't particularly reccommend this way, But it is a way you could do it. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/72918-switch_requestlanguage/#findComment-367763 Share on other sites More sharing options...
rilana Posted October 12, 2007 Author Share Posted October 12, 2007 thanks a lot for all the info. The link's are verry usefull for further projects. But for now I just wann solve that one problem with the switch. the thing is I dont wanna include anything, I just wanna redirect to the same file in another directorie.... anymore sugestions? My client doesnt wanna get a database..... Quote Link to comment https://forums.phpfreaks.com/topic/72918-switch_requestlanguage/#findComment-367819 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.