Download
Last stable v 5.2 2024-11-01
{t}
Smarty gettext block plugin. The content of the block function is the string that you want to translate. For example, for translating 'Hello World', use: {t}Hello World{/t}. If you have dynamic parameters that should be set inside the string, pass them to the block function, and they will be replaced with %n, where n is 1 for the 1st parameter and so on. For example, {t name="sagi"}my name is %1{/t} will replace %1 with sagi. The parameter name is ignored, unless it is one of the reserved names (see below). Only the parameters order matters. The following parameters are reserved:
By default, all the translated strings will be automatically HTML escaped. You may control this by setting the 'escape' parameter. Possible values:
To provide a plural form:
Sample for using multiple parameters:
{t 1='one' 2='two' 3='three'}The 1st parameter is %1, the 2nd is %2 and the 3nd %3{/t}