|
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 |
dafire Smarty n00b
Joined: 11 Aug 2004 Posts: 3
|
Posted: Wed Sep 01, 2004 8:14 am Post subject: SmartestSmartyMultilanguageSupport |
|
|
I really like the gettext plugin from the wiki and added a small functionality someone else might find useful to.
I wanted to be able to change the translated string so you could add a variable to it without need a gettext string for every possible value of that vars..
I added my changes as comment to http://smarty.incutio.com/?page=SmartestSmartyMultilanguageSupport
if you have suggestions please tell me .. it's a rather basic change.. ok here an example:
php file:
Code: |
$smarty->assign(array("eslot"=>$slot,"eserver"=>$server));
$smarty->assign("error","Slot [[[eslot]]] on Server '[[[eserver]]]' is already in use.");
|
template:
Code: |
{if $error}<span style="color:red">{t parse=1}{$error}{/t}</span>{/if}
|
So the string is easy translateable but it's not static |
|
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
|