From: Reini U. <ru...@x-...> - 2001-12-09 16:44:54
|
Carsten Klapp schrieb: > <?php > // language codes are comma delimited > $lang = strtok ( $HTTP_ACCEPT_LANGUAGE, "," ); > while ( $lang ) { > //if there is "en" in it > if ( strstr ( $lang, "en" ) ) { > header ( "Location: http://localhost/english/" ); > exit; ... better is to check the first 2 chars only. if ( substr($lang, 0,2) == "en" ) otherwise we might get a match on the secondary specification. (de_at) -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |