资 源 简 介
Introduction
This project enables full (n)gettext support in Smarty. There is little to no custom built, no regular expressions, etc. but it completely relies on Smarty functionality (e.g. the Smarty compiler, etc.) reducing the risks of incompatibilities, reduction or replication of functionality.
You will still be able to use Smarty variable modifiers alongside with your translated texts without the need to save the translation in a variable before.
This project utilizes the built-in Smarty compiler to produce files that can be processed with xgettext to extract message-IDs in singular (gettext) or plural (ngettext) form. Basically it does nothing else but relying on the Smarty compiled templates ;) - sounds lame but it"s an approach I haven"t seen yet.
Let"s cut to the gist, show me some examples!
Requirements
PHP with