Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a i18n/translation solution for Smarty?

I'm developing a PHP-based application that requires internationalization (i18n) support.

I'm using Smarty 3 as a template solution (and TinyMVC as the framework), and although I've been using it for small projects before (back in the days of Smarty 2.x), I haven't known about any easy-to-use i18n plugins for it. Is there such plugin/extension for Smarty 3.x that'll do the job for me? I don't mind if the backend is a bit hard to setup, that's fine, all I need is a good way to implement it in templates.

I need to translate this app into multiple languages, so I need to find a way for Smarty to support it. Is there one? Thanks.

like image 491
Jimmie Lin Avatar asked Jul 26 '11 09:07

Jimmie Lin


1 Answers

You can use a gettext plugin with Smarty, such as the one posted on this thread which the poster developed for Smarty 3 and that he claims to have been using in production for over six months without issue.

like image 191
karim79 Avatar answered Oct 08 '22 22:10

karim79