View Single Post
Old 08-24-2006, 03:07 PM  
polle54
Confirmed User
 
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
Quote:
Originally Posted by JOKER | JOKEREMPIRE Inc.
For reliability I'd rather go with system-language or even better GeoIP...

Anyways, this code should do it.

Code:
<s c r i p t>
targetLanguage = "COUNTRY-CODE HERE";
targetURL = "http://URL.HERE";
bLang = navigator.Language ? navigator.Language : navigator.userLanguage;
if (bLang.indexOf(targetLanguage) >= 0) window.location.href=targetURL;
</s c r i p t>
Take the spaces out of the s c r i p t tags of course and enter CountryCode and URL
thanks man

can it be made so I can exexute a special line of for a specific country, not redirect to a new site just maybe print a line of html text
__________________
ICQ# 143561781
polle54 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote