4.7.5 Internacionalización
Aquí se agrupan los
helpers para la traducción de textos. Se encuentran en el archivo
i18n.hlp.php. Se compone de un sólo helper.
function __($text, $args=array(), $prefix, $sufix)Descripción
Incluye texto traducible a muchos idiomas en una plantilla.
Parámetros:
- String $text Termino clave a traducir
- Array $args Argumentos que serán reemplazados con la funcion strtr
- String $prefix Prefijo que contextualiza al termino
- String $sufix Sufijo que contextualiza al termino
Ejemplo
<table style="margin: 0 auto;" border="1" summary="Data del controller">
<thead>
<tr>
<th><?= __('id',array(),'BKE','MOD'); ?></th>
<th><?= __('customer',array(),'BKE','MOD'); ?></th>
<th><?= __('birthday',array(),'BKE','MOD'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($customers as $key=>$customer): ?>
<tr>
<td><?= $customer['id_cliente'] ?> </td>
<td><?= $customer['surname'].', '. $customer['name'] ?> </td>
<td><?= $customer['birthday']?> </td>
</tr>
<?php endforeach;?>
</table>
<?php echo __('Existen %1% Clientes en el sistema', array('%1%' => $countClients)) ?>
Url |
Resumen