Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/07/2009, 15:22
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Tengo 2 Dudas please ayuda...

Podrias hacer algo asi

tabla de Español
nombreVariable, valorVariable
"linkLogin", "Acceder"
"linkSignup", "Registrarse"
"Body", "Informacion que va en el cuerpo, etc, etc, etc"
"Title", "Esto es una prueba"

tabla de Ingles
nombreVariable, valorVariable
"linkLogin", "Login"
"linkSignUp", "Sign Up"
"Body", "Information in the body, etc, etc, etc"
"Title", "This is a test"


index.php
Código PHP:
<?php
//Conectarse a la base de datos 
//y hacer el query de la base de datos conforme al idioma
//que escogio el usuario.
//Luego creas un while
while($row mysql_fetch_assoc($query)){
  
$Title = ($row["nombreVariable"] == "Title" && empty($Title) ? $row["valorVariable"] : "");
  
$Body = ($row["nombreVariable"] == "Body" && empty($Body) ? $row["valorVariable"] : "");
  
$linkLogin = ($row["nombreVariable"] == "linkLogin" && empty($linkLogin) ? $row["valorVariable"] : "");
  
$linkSignUp = ($row["nombreVariable"] == "linkSignUp" && empty($linkSignUp) ? $row["valorVariable"] : "");
}
?>
<html>
<head>
<title><?php echo $Title?></title>
</head>
<body>
<a href="login.php"><?php echo $linkLogin?></a>
<a href="signup.php"><?php echo $linkSignUp?></a>
<?php echo $Body?>
</body>
</html>
Bueno algo asi. Debe haber una mejor forma pero mientras tanto puedes empezar con esto.