patch - translation support for smarty
| From: | Roel Vanhout | Date: | Tue, 06 Mar 2001 21:27:29 +0000 |
| Subject: | patch - translation support for smarty | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-327@lists.php.net to get a copy of this message | ||
Hi all,
Like I discussed in the text that I send to this list two days ago, I
have implemented translation support into Smarty. I have tarred it up,
together with some bare bone test drivers, scripts and translations, in
the hope that someone would take it for a test drive and let me know
which problems there are, which things you would like to see improved,
etc. I would also like to hear the opinion of the Smarty developers, as
I'm hoping this patch would make it into the 'official' Smarty
distribution, so that I don't have to manually apply this patch for
every new version of Smarty that is released.
Following the suggestion that came from someone on this list, I have
added support to have variables in the strings you want to translate; I
however have not added support for the advanced things that stphp
provides. Imho they serve a very rare need; however, I may add them in
the future. Read the doc for (a bit) more on this.
I have attached the tarball; inside, you will find a diff to make it
easy to see which changes I had to make to Smarty.class.php, a full,
patched version of Smarty.class.php for people who don't have 'patch' on
their systems, an updated version of the document I send two days ago,
a directory with two primitive but functional 'drivers', and a directory
with some test scripts. I you want to try it out, make sure to set the
'translate' variable in Smarty.class.php to 'true'. Read the docs on how
to use the translations, or look at the example script, if there are any
questions or things that could be better, *please* contact me. Also if
you can't get it to run, let me know what goes wrong, and what error
messages you get.
cheers,
roel
Attachment: [application/x-gzip] smarty-translations.tar.gz
Attachment: [application/x-gzip] smarty-translations.tar.gz