Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/08/2009, 15:20
Avatar de dyegox
dyegox
 
Fecha de Ingreso: enero-2008
Mensajes: 173
Antigüedad: 16 años, 3 meses
Puntos: 7
problema con php-gettext

hola quiero usar la libreria php-gettext
pero me aparece el siguiente error 5 veces:

Only variables should be passed by reference
C:\xampp\htdocs\lib\core\gettext.php
66

mi codigo es este:

Código PHP:
<?php
/**
 *
 * @access public
 * @since 1.0.0
 * @author Dii3g0
 */
 
 
if( isset($_GET['source']) ) { //Show source code
    
highlight_file(__FILE__);
    exit;
    }

 if ( !
defined('PATH') ) //Define file patch
    
define('PATH'dirname(__FILE__) . '/');
    
require_once(
PATH 'Config.php'); // Load config file
require_once(PATH 'lib/core/Mysql.class.php'); //Connect with Mysql
require_once(PATH 'lib/core/streams.php'); //Connect with Mysql
require_once(PATH 'lib/core/gettext.php'); //Connect with Mysql

function __($texto) {
         global 
$gettext_tables;
         if (
is_null($gettext_tables)) return $texto;
         else return 
$gettext_tables->translate($texto);
}

if (
file_exists('lang/' LANG '/default.mo')) {
   
$gettext_tables =   new gettext_reader( new CachedFileReader('lang/' LANG '/default.mo'));
   if (!
is_null($gettext_tables)) $gettext_tables->load_tables();
}

echo 
__("Este texto esta en español.");
?>
lo archivos de la libreria estan bien incluidos el archivo .mo existe y esta incluido pero no me lo traduce