Skip to content
This repository has been archived by the owner on Aug 10, 2020. It is now read-only.

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Feb 24, 2012
1 parent a565702 commit 9c56936
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ResConsulta.php
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,7 @@ function reporteRevistaHtml($idcaso, $db = null, $campos = array(),
$a = explode("-", $dcaso->fecha);
/*$ts=mktime(0, 0, 0, $a[1], $a[2], $a[0]);
setlocale(LC_TIME, "es");
strftime ... Se intentó pero no soportó locale es */
strftime ... Se intentó pero OpenBSD 5.0 no soportó locale es */
if ($tex) {
$fecha = $a[2] . "/" . $GLOBALS['mes_corto'][(int)$a[1]] .
"/" . substr($a[0], 2);
Expand Down
1 change: 1 addition & 0 deletions aut.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ function nomSesion()
*/
function autenticaUsuario($dsn, $accno, &$usuario, $opcion)
{
idioma("en");
$snru = nomSesion();
if (!isset($_SESSION) || session_name() != $snru) {
session_name($snru);
Expand Down
7 changes: 7 additions & 0 deletions misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2320,5 +2320,12 @@ function tam_arreglo($arr)
return $tmem;
}

function idioma($l = "es") {
putenv("LC_ALL=$l");
setlocale(LC_ALL, $l);
bindtextdomain("sivel", "./locale");
textdomain("sivel");
}


?>
2 changes: 1 addition & 1 deletion sitios/pordefecto/conf.php.plantilla
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ $GLOBALS['MENS_ORTOGRAFIA'] = 'Las palabras que est
/** Mensaje por presentar en la p�gina principal para indicar donde reportar fallas.
* @global string $GLOBALS['REPORTA_FALLAS']
*/
$GLOBALS['REPORTA_FALLAS'] = "<a href=\"http://sivel.sf.net/\">Documentacin</a><br><a href=\"http://190.25.231.236/Divipola/Divipola.asp\" target=\"2\">DIVIPOLA</a><br>Por favor reporte fallas o requerimientos en el sistema de seguimiento disponible <a href='http://sourceforge.net/tracker/?group_id=104373&atid=637817'>en l�nea</a>";
$GLOBALS['REPORTA_FALLAS'] = "<a href=\"http://sivel.sf.net/\">Documentaci&oacute;n</a><br><a href=\"http://190.25.231.236/Divipola/Divipola.asp\" target=\"2\">DIVIPOLA</a><br>Por favor reporte fallas o requerimientos en el sistema de seguimiento disponible <a href='http://sourceforge.net/tracker/?group_id=104373&atid=637817'>en l�nea</a>";

/** Ancho en porcentaje de tablas en reporte general.
* Puede cambiarse en caso de que tenga problemas al imprimir (por ejemplo
Expand Down
8 changes: 5 additions & 3 deletions tablas_basicas.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$aut_usuario = "";
autenticaUsuario($dsn, $accno, $aut_usuario, 11);

encabezado_envia("Tablas básicas");
encabezado_envia(_("Tablas B&aacute;sicas"));

require_once 'HTML/Menu.php';
require_once 'HTML/Menu/DirectTreeRenderer.php';
Expand All @@ -43,14 +43,16 @@
$menu->render($rend);
echo '<table border = "0" width = "100%"><tr>' .
'<td style = "white-space: nowrap;background-color:#CCCCCC;" ' .
'align="center" valign="top" colspan="2"><b>Tablas Básicas</b>' .
'align="center" valign="top" colspan="2"><b>'
. _('Tablas B&aacute;sicas') . '</b>' .
'</td></tr></table>';
print $rend->toHtml();

echo '<pr>&nbsp;</pr><table border="0" width="100%" ' .
'style="white-space: nowrap; background-color:#CCCCCC;"><tr>' .
'<td align="right">' .
'<a href="index.php"><b>Menú Principal</b></a>' .
'<a href="index.php"><b>' .
_('Men&uacute; Principal') . '</b></a>' .
'</td></tr></table>';
pie_envia();
?>

0 comments on commit 9c56936

Please sign in to comment.