Bug Report #1072
New i18n system for 2.4
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Urgent | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Core | |||
| Target version: | 2.4 | |||
| Resolution: | fixed | Points: |
Description
2.4 Should not have a key based i18n system, but instead a translation based system.
A preliminary i18n class is attached.
History
Updated by Ben Rogers about 3 years ago
I think its a great idea to move away from the key based i18n system, however i have one comment about the proposed patch.
the function +(). Kohana so far has worked with out adding any functions or variables to the global namespace, making a fully object oriented framework. I feel using a function like +() breaks this appeal kohana has. while in terms of writing, its simple to write +('some text'); however for those not aware of what the function is intended for, will be confused by its lack of a useful name or documentation. I propose using a public static method inside the i18n class, something like I18n::translate();
if a certain user wished to impliment his own +() function to mirror the class function, they could always do so with a hook.
Updated by Jeremy Bush about 3 years ago
Initial library added in r3935.
Updated by Kiall Mac Innes almost 3 years ago
We're doing an app at the moment that needs to be 100% translated to several languages, we're looking at using GNU GetText and Pootle to do the translations... - I'm curious why gettext hasn't been used? - dont get me wrong, im not saying kohana should use GetText - im just curious if it was considered, and if it was - why it was ruled out?
Some relevant links:
http://ie.php.net/manual/en/function.gettext.php
http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/
Updated by Jeremy Bush almost 3 years ago
It was considered, but I don't feel it's standardized enough to use in a general purpose framework.
Updated by Jeremy Bush almost 3 years ago
Initial core change performed in r3976.
Updated by Jeremy Bush almost 3 years ago
Exception code updated in r3982.
Updated by Jeremy Bush almost 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Resolution set to fixed