|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
DonDa Smarty n00b
Joined: 20 Nov 2009 Posts: 1
|
Posted: Fri Nov 20, 2009 5:17 pm Post subject: Translate function |
|
|
Hi there,
I'm currently upgrading Smarty 2 to 3.
But: In the previous version a had made a custom translate function something like this [#KEY.TO.TRANSLATE#].
Now i did it there with extending the smarty.class with the _compile_source function that was avaible then.
But this function is now disappeared or replaced?
How can i fix this? There's no documentation for Smarty 3 so it makes it hard to find it on my own.
Thanks and sorry for the lacky English. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Nov 20, 2009 7:53 pm Post subject: |
|
|
Instead of hacking Smarty 2 OR 3, I'd recommend using a prefilter to replace the [#KEY.TO.TRANSLATE#] to the corresponding text or function calls, then let the compiler handle them as per usual. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|