Foros del Web » Creando para Internet » Diseño web »

Cambio de idioma

Estas en el tema de Cambio de idioma en el foro de Diseño web en Foros del Web. Hola buen dia, yo tengo una web en PHP, y tengo el idioma en archivo php con array, el codigo de el header que es ...
  #1 (permalink)  
Antiguo 22/07/2009, 13:11
 
Fecha de Ingreso: junio-2008
Mensajes: 104
Antigüedad: 15 años, 9 meses
Puntos: 1
Cambio de idioma

Hola buen dia, yo tengo una web en PHP, y tengo el idioma en archivo php con array, el codigo de el header que es donde pide el idioma es:

Código PHP:
<?php
header
("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); 
header("Cache-Control: no-cache, must-revalidate" ); 
header("Pragma: no-cache" );

if(
file_exists('../includes/constants.php')){
include_once 
"../includes/constants.php";
include_once 
"../includes/rating_functions.php";
} else {
include_once 
"includes/constants.php";
include_once 
"includes/rating_functions.php";
}

?>
<script src="<?=$web_path;?>/topbar/top1.php" type="text/javascript"></script>
<script src="<?=$web_path;?>/peels/peel/peel.js" type="text/javascript"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<link href="<?=$web_path;?>css/music.css" type="text/css" rel="stylesheet" />
<title><? if (isset($_GET[search])) { echo "$search - "; } ?><?=$settings['site_title'];?></title>
<meta name="keywords" content="<?=$settings['site_keywords'];?>" />
<meta name="description" content="<?=$settings['site_desc'];?>" />
<link rel="stylesheet" href="<?=$web_path;?>css/pop.css" media="screen,projection" type="text/css" />
<link rel="stylesheet" href="<?=$web_path;?>css/style.css" media="screen,projection" type="text/css" />
<link rel="stylesheet" href="<?=$web_path;?>css/rating_style.css" media="screen,projection" type="text/css" />
<?
include $web_root."css/style.php";
include 
$web_root."css/rating_style.php";
include 
$web_root."includes/functions.php";
include 
$web_root."includes/language.php";
include_once(
$web_root."includes/sources/init.php");
?>
<script language="JavaScript" type="text/javascript" src="<?=$web_path;?>js/ajax_search.js"></script>
<script type="text/javascript" src="<?=$web_path;?>js/prototype.js"></script>
<script type="text/javascript" src="<?=$web_path;?>js/pop.js"></script>
<script type="text/javascript" src="<?=$web_path;?>js/tooltip.js"></script>
<script type="text/javascript" src="<?=$web_path;?>js/display.js"></script>
<script type="text/javascript" src="<?=$web_path;?>js/email.js"></script>
<script type="text/javascript" src="<?=$web_path;?>js/load.js"></script>

</head>

<!-- Main Container -->
<div class="clear_main">

    <div class="topband">
        <div class="top_left"></div>

        <div class="top_menu">
        <? if($session->logged_in){?>
      <span><?=$lang['Welcome'];?> <? echo $session->username?></span>
            <span>|</span>
            <a href="<?=$web_path;?>userinfo.php?user=<? echo $session->username?>"><?=$lang['AccountHome'];?></a>
                 <span>|</span>
      <? if($session->isAdmin()){?>
      <a href="<?=$web_path;?>mu" class="white"></a>      <a href="<?=$web_path;?>admin/admin.php"><?=$lang['AdminPanel'];?></a> <span>|</span> 
      <? ?>
            <a href="<?=$web_path;?>myplaylist"><?=$lang['MyPlaylist'];?></a>
                 <span>|</span>
          <a href="<?=$web_path;?>mu" class="white"><?=$lang['DescargaMV'];?></a>
          <span>|</span>
          <a href="<?=$web_path;?>/old/tutoriales" target="_self">Tutoriales</a></li>
          <a href="<?=$web_path;?>faq.php" class="white"> |
          <?=$lang['FAQ'];?>
          </a>
                 <span>|</span>
        <a href="<?=$web_path;?>process.php" class="white"><?=$lang['Logout'];?></a>    
        <? } else { ?> 
        <?=$lang['NotaMember'];?> <a href="<?=$web_path;?>register.php"><?=$lang['Signup'];?></a>
          <span>|</span>
      <a href="<?=$web_path;?>main.php"><?=$lang['MemberLogin'];?></a>
          <span>|</span>
          <a href="<?=$web_path;?>/old/tutoriales" target="_self">Tutoriales</a></li>
          <span>|</span> </a>      <a class="white" href="<?=$web_path;?>faq.php"><?=$lang['FAQ'];?></a>
      <? ?>
        </div>

        <div class="top_right"></div>
    </div>
Tiene la funcion: include $web_root."includes/language.php"; que es para sacar de ahi las palabras, pero yo quiero incluirle el siguiente codigo:


Código PHP:
$_SESSION['Language'] = $_POST['Language'];
// setcookie("Language", $_POST['Language'], time() + 3600);
// URL method will require you to add the QUERY STRING to all pages. might get tough
if($Language == 'English') {
  include 
'English.php';

Para que el usuario pueda seleccionar entre 2 idiomas. Pero ya trate de incluirlo y me marca un error. Quisiera saber si alguien me puede ayudar. saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:25.