Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/08/2013, 13:21
santi2892009
 
Fecha de Ingreso: mayo-2012
Mensajes: 363
Antigüedad: 12 años
Puntos: 0
el contenido de iframe no carga el idioma

buenas noches:pues os indico lo que lo tengo,el contenido del iframe no cambia el idioma al ingles español y demas:
-------------------------------------
plantilla.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{titulo_web}</title>

<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="pagewidth" >
<div id="header">
<h1>&nbsp;&nbsp;&nbsp;{titulo_web}</h1>
</div>
<div id="wrapper" class="clearfix">
<iframe name="contenido" width="200" height="200">
<h1>&nbsp;&nbsp;&nbsp;</h1>
<p><h1>&nbsp;&nbsp;&nbsp;</h1> </p>
</iframe>
<div id="leftcol">
<ul>Elija su idioma
<li><a href="index.php?idioma=es">Español</a></li>
<li><a href="index.php?idioma=en">Ingles</a></li>
<li><a href="index.php?idioma=it">Italiano</a></li>
</ul>
<hr />
<ul>Menu
<li><a href="registro.php" target="contenido">{#archivo}</a></li>
<li><a href="inicio.php" target="contenido">{#herramientas}</a></li>
<li><a href="#">{#ayuda}</a></li>
<li><a href="#">{#proyecto}</a></li>
<li><a href="#">{#acercade}</a></li>
</ul>
</div>
</div>
<div id="footer">&nbsp;&nbsp;&nbsp;Copyright © 2012 jc-Mouse</div>
</div>
</body>

</html>

´´´´´´´´´´´´´´´´´´´´
index.php;
----------------------
<?php
require 'inc/class/lenguaje.php';

if( $_GET )
$key = ( isset($_GET['idioma']) )? $_GET['idioma'] : 'es' ;

# se crea instancia a lenguaje
$idioma = new lenguaje( $key );
# se carga array de idioma
$diccionario = $idioma->get_idioma();
# se carga la plantilla HTML
$template = file_get_contents('inc/tpl/plantilla.tpl.php');
#se llenan los valores generales a toda la plantilla
foreach ($diccionario as $clave=>$valor) {
$template = str_replace('{'.$clave.'}', $valor, $template);
}
#Se muestra pagina web
echo $template;
?>
-----
registro.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body><?
require 'index.php';
?>
<div id="wrapper" class="clearfix">
<p> {hola estoy en el registro de usuarios}
</p></div>
<p>
</body>
</html>
class.lenguaje;
------
<?php
# CLASE PARA GESTIONAR EL IDIOMA DEL USUARIO
class lenguaje
{
private $key;
#:._______________________________________________ __ soy una barra separadora :)
public function __construct($k='es')
{
$this->key = $k;
}
#:._______________________________________________ __ soy una barra separadora :)
# Carga idioma elegido y retorna en un array
public function get_idioma()
{
#Si achivo de idioma es correcto
$file = 'inc/lenguaje/'.$this->key.'.inc.php';
if ( is_file( $file ) )
include_once $file;
else
include_once 'inc/lenguaje/es.inc.php';
return $id;
}
#:._______________________________________________ __ soy una barra separadora :)
}
?>

----alguien me puede indicar como hacer que se abre el enlace en el iframe y cuando le de a cambiar idioma se haga???