Ver Mensaje Individual
  #9 (permalink)  
Antiguo 24/09/2008, 02:24
migquintana
 
Fecha de Ingreso: marzo-2008
Mensajes: 79
Antigüedad: 17 años, 1 mes
Puntos: 0
Respuesta: Alguien ha utilizado POEdit para ontar un sitio con varios idiomas?

Cita:
Iniciado por arriaka Ver Mensaje
Hola

Bueno, migquintana, gracias por tu ayuda, pero sigo con el mismo problema.

Estos días he estado haciendo diferentes pruebas y por ahora no he conseguido solucionarlo. Cuando cambio los idiomas de es_ES a esm_esp ya no funciona.

La única manera de que los cabios se actualicen es reiniciando el Apache, y no es precisamente una buena solución.

Saludos y gracias


Lo conseguí en un respaldo:

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>


<?php

//$idioma=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2); 

$language=(isset($_REQUEST['language']))?trim(strip_tags($_REQUEST['language'])):"esm_esp";
putenv("LC_ALL=$language");
setlocale(LC_ALL$language);
bindtextdomain("messages""./locale");
textdomain("messages");

print 
"<p><a href=\"".$_SERVER['PHP_SELF']."?language=enu_usa\">English</a> -
<a href=\""
.$_SERVER['PHP_SELF']."?language=fra_can\">French</a> -
  <a href=\""
.$_SERVER['PHP_SELF']."?language=esm_esp\">Español</a></p>\n";

print 
"<p>"._("Esa pagina esta en portugues")."</p>\n";
print 
"<p>"._("estas alli")."</p>\n";
print 
"<p>"._("eso es bueno")."</p>\n";

//echo ($idioma)
?>


</body>
</html>


Mi archivo messages.po: (está ubicado en mi directorio: F:\AppServ\www\test\locale\ensa\LC_MESSAGES)

msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-22 12:00-0000\n"
"PO-Revision-Date: \n"
"Last-Translator: miguel <[email protected]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: English\n"
"X-Poedit-Country: UNITED STATES\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
"X-Poedit-Basepath: C:\\AppServ\\www\\test\n"
"X-Poedit-SearchPath-0: .\n"

#: index.php:27
msgid "Esa pagina esta en portugues"
msgstr "This page is in Portuguese"

#: index.php:28
msgid "aja estas alli"
msgstr "Ohh, you are there"

#: index.php:29
msgid "ya yo lo se"
msgstr "I know it"




Mi archivo messages.po: (está ubicado en mi directorio: F:\AppServ\www\test\locale\fra_can\LC_MESSAGES)


msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-22 14:16-0000\n"
"PO-Revision-Date: \n"
"Last-Translator: miguel <[email protected]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: French\n"
"X-Poedit-Country: FRANCE\n"
"X-Poedit-SourceCharset: iso-8859-1\n"
"X-Poedit-Basepath: C:\\AppServ\\www\\test\n"
"X-Poedit-SearchPath-0: .\n"

#: index.php:25
msgid "Esa pagina esta en portugues"
msgstr "le pagine es en portuguese"

#: index.php:26
msgid "aja estas alli"
msgstr "ahh, estas ali"

#: index.php:27
msgid "ya yo lo se"
msgstr "ya lo conozco"




Ojo, las traducciones no tienen mucho sentido, son producto de actos desesperados en su momento

Espero te ayude
__________________
Jesus dijo: el que cree en mi tiene vida eterna[/B]