Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/12/2008, 15:50
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: Deteptar idioma del visitante.

Código PHP:
<?php 
include('includes/config.php');
// Agrega esta linea:
$lang substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 02);
$lang$_GET['lang']? $_GET['lang'] : $lang;
// Aqui verifica si existe el idioma seleccionado, si no, pon el que usas por default
include('language/'.$lang.'.php');
?>
<html>
<head>
<title> <?php echo $_lang['title'];?> </title>
</head>
<body>
<a href="algunlink.php?lang=<?php echo $_GET['lang'];?>"><?php echo $_lang['clickhere'] ;?></a>
</body>
</html>
__________________
- León, Guanajuato
- GV-Foto