The {tt} function allows you to Translate a string from within Smarty. Anything within the {tt} block will be sent to the translation system and will be outputted in the language of the viewer if there is an entry for the original text in the target language.

By using {tt} within your Smarty templates you’ll be able to build fully translated modules and pages. Any text entries wrapped in {tt} can be translated in the Translation Administration page.

Simple Usage

{tt}Hellow World{/tt}. Sample result: Hola, mundo!

Advanced Usage

{tt arg1=$name}Hello, %s!{/tt}

  • Sample Input: $name = ‘Jane’
  • Sample Result: Hola, Jane!

As a Modifier

{assign var=”myTitle” value=”Welcome to my site!”|tt}{$myTitle}

Sample Result: “Willkommen auf meiner Seite!”