|
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 |
jeliasson Smarty n00b
Joined: 10 Jan 2013 Posts: 3
|
Posted: Thu Jan 10, 2013 8:32 pm Post subject: Translation plugin |
|
|
Hi,
I've created a translation module in PHP which I want to call using Smarty.
However, I'm not passing the translation variable(s) to the view and I want to call it like {ABOUT_EMAIL|translate} with the option to pass an argument, e.g. {ABOUT_ME|translate language='en'}.
Would this be possible, or must I threat it was a function, e.g. {translate('ABOUT_ME', 'en')} ?
Thank you |
|
Back to top |
|
jeliasson Smarty n00b
Joined: 10 Jan 2013 Posts: 3
|
Posted: Thu Jan 10, 2013 8:43 pm Post subject: |
|
|
Nevermind, I will go for a function and use {translate name=ABOUT_ME language=en} |
|
Back to top |
|
jeliasson Smarty n00b
Joined: 10 Jan 2013 Posts: 3
|
Posted: Thu Jan 10, 2013 8:44 pm Post subject: |
|
|
One question however,
Is it possible to get ABOUT_ME from {translate ABOUT_ME}?
If yes, how?
Also, if is it then possible to pass more arguments? e.g. {translate ABOUT_ME language=en}? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
|
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
|