Afayk, you cannot combine them the way you like. The only idea I have is to write my own truncate function along with your translation function:
function do_translation($params, $content, $smarty, &$repeat) { if (isset($content)) { $options = $params["options"]; $content = yourTranslateFunction($content); if ($options['truncate']) $content = yourTruncateFunction($content); return $content; } } $smarty->registerPlugin("block", "tr", "do_translation");
Then you can call it in Smarty as follows:
{tr truncate="1"}Really long text I want to be translated then truncated{/tr}
source share