Question

I just wonder about an easy way to make i18n inside Smarty templates. Something like gettext() which I already use inside my PHP scripts.

Any ideas?

Was it helpful?

Solution

My recent attempt to use intSmarty (http://code.google.com/p/intsmarty/) was unsuccessful -- it seemed to me that the intSmarty class is not compatible with the latest Smarty code, which isn't surprising since the intSmarty design broke encapsulation by overriding a private method.

This one: http://blog.piins.com/2008/03/first-piins-os-release-smarty-i18n.html sounds interesting but I've found the documentation lacking. I've got a test install up and I'm trying to decipher the example code enough to see if it is really useful.

There's http://sourceforge.net/projects/smarty-gettext/ which I haven't evaluated yet, but plan to do so.

Love to see what others have found as well

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top