I have a es.php
and a tl.php
in the i18n folder:
es.php:
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'Good Morning' => 'Buenos Dias',
);
tl.php (is the abbreviation of a human language. No idea which one):
<?php defined('SYSPATH') or die('No direct script access.');
return array(
'Good Morning' => 'Magandang Umaga',
);
view file site.php
:
<p><?php echo __('Good Morning'); // would produce 'Buenos dias'?></p>
I'm using Kohana 3. Right now, the only way known method to change the language is to modify I18n::lang('es-es');
in bootstrap.php
.
How can I change the preferred language when clicking in an anchor link (an anchor link inside site.php
)?