Bug Report #1072

New i18n system for 2.4

Added by Jeremy Bush about 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:
Priority:UrgentDue date:
Assignee:Jeremy Bush% Done:


Target version:2.4
Resolution:fixed Points:


2.4 Should not have a key based i18n system, but instead a translation based system.

A preliminary i18n class is attached.

I18n.php Magnifier (1.16 KB) Jeremy Bush -, 01/22/2009 05:30 PM


#1 Updated by Ben Rogers about 6 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.

#2 Updated by Jeremy Bush about 6 years ago

Initial library added in r3935.

#3 Updated by Kiall Mac Innes about 6 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:

#4 Updated by Jeremy Bush about 6 years ago

It was considered, but I don't feel it's standardized enough to use in a general purpose framework.

#5 Updated by Jeremy Bush about 6 years ago

Initial core change performed in r3976.

#6 Updated by Jeremy Bush about 6 years ago

Exception code updated in r3982.

#7 Updated by Jeremy Bush almost 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Resolution set to fixed

Also available in: Atom PDF