Welcome Guest, Not a member yet? Register   Sign In
i18n Approach
#1

[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!
#2

[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.




Theme © iAndrew 2016 - Forum software by © MyBB