Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
SmartestSmartyMultilanguageSupport

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
dafire
Smarty n00b


Joined: 11 Aug 2004
Posts: 3

PostPosted: Wed Sep 01, 2004 8:14 am    Post subject: SmartestSmartyMultilanguageSupport Reply with quote

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 Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP