forzatio Posted August 29, 2007 Share Posted August 29, 2007 Hi there, I'm using a little newsflash item on my webpage, which is some text in an iframe. I have one newsflash item in English and one in another language, newsflash-english.html and newsflash-other.html How can I serve newsflash-english.html to english surfers and newsflash-other.html to not english users ? depending on the browser language ? thank you Quote Link to comment https://forums.phpfreaks.com/topic/67209-language-depending-item-urls/ Share on other sites More sharing options...
Ken2k7 Posted August 29, 2007 Share Posted August 29, 2007 Not sure you can get the browser language, but you can have a dropdown and let the person choose the language. Quote Link to comment https://forums.phpfreaks.com/topic/67209-language-depending-item-urls/#findComment-337087 Share on other sites More sharing options...
forzatio Posted August 29, 2007 Author Share Posted August 29, 2007 I found some code but I get these errors Warning: Unexpected character in input: '\' (ASCII=92) state=1 Parse error: parse error, unexpected '<' <?php function comefrom() { $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; if (substr($lang, 0, 2) == 'en') { \<iframe src="nieuwtjes-en.html"\; } else { \<iframe src="nieuwtjes.html"\; } } Quote Link to comment https://forums.phpfreaks.com/topic/67209-language-depending-item-urls/#findComment-337159 Share on other sites More sharing options...
forzatio Posted September 4, 2007 Author Share Posted September 4, 2007 hello, can anyone help me with this faulty code ? Quote Link to comment https://forums.phpfreaks.com/topic/67209-language-depending-item-urls/#findComment-341403 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.