Показать сообщение отдельно
Старый 16.08.2005, 03:20     # 10
Ale
Junior Member
 
Регистрация: 22.03.2004
Сообщения: 123

Ale Известность не заставит себя ждатьAle Известность не заставит себя ждать
Грубо говоря как-то так

PHP:
Код:
if(stristr($HTTP_ACCEPT_LANGUAGE,"ru")) {header("Location: http://rambler.ru");}
elseif(stristr($HTTP_ACCEPT_LANGUAGE,"de")) {header("Location: http://yahoo.de");}
else{header("Location: http://yahoo.com");}
Perl:
Код:
$lang = lc($ENV{'HTTP_ACCEPT_LANGUAGE'});
if (index($lang, "ru")>-1) {print "Location: http://rambler.ru\n\n";}
elsif (index($lang, "de")>-1) {print "Location: http://yahoo.de\n\n";}
else {print "Location: http://yahoo.com\n\n";}
JavaScript:
Код:
if(document.all)lng=navigator.browserLanguage
else lng=navigator.language
lng=lng.toLowerCase()
if (lng.indexOf('ru') > -1) document.location.href = 'http://rambler.ru'
else if (lng.indexOf('de') > -1) document.location.href = 'http://yahoo.de'
else document.location.href = 'http://yahoo.com'
Звиняюсь если где ошибнулся - щас нет возможности проверить все
Ale вне форума