CodeIgniter Forums
i18n Approach - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: i18n Approach (/showthread.php?tid=50025)



i18n Approach - El Forum - 03-11-2012

[eluser]Unknown[/eluser]
I'm trying to figure out the i18n system in CI. I've used a CMS based on a previous version of CI and their i18n approach is to wrap the text like:

Code:
echo __('Some text here');

The language file is then set up similar to:

Code:
return array(
    'Some text here' => 'Ein Text hier');

What is the advantage to CI's current method of using a method call instead of the usage above? I'm asking because I'm not entirely sure how the method I showed up top works, exactly, but it seems less ... "clumsy" to me. I've noticed that Symfony framework seems to have gotten away from the __() method, as well.

Thanks!


i18n Approach - El Forum - 03-11-2012

[eluser]skunkbad[/eluser]
I'm not thrilled with CIs i18n, and even the i18n library in the wiki doesn't really make things perfect. I hope they will gut it and make it much better in a future version of CI.