...
Les chaînes des frichiers TPL devront être transformée en contenu dynamique, qui Smarty remplacera par le traduction dans la langue choisie. Dans notre module d'exemple, ce fichier :
Code Block |
---|
| xml | xml |
---|
title | mymodule.tpl (partial) |
---|
borderStyle | solid |
---|
| xml |
---|
|
<li>
<a href="{$base_dir}modules/mymodule/mymodule_page.php" title="Click this link">Click me!</a>
</li>
|
...devient :
Code Block |
---|
| xml | xml |
---|
title | mymodule.tpl (partial) |
---|
borderStyle | solid |
---|
| xml |
---|
|
<li>
<a href="{$base_dir}modules/mymodule/mymodule_page.php" title="{l s='Click this link' mod='mymodule'}">{l s='Click me!' mod='mymodule'}</a>
</li>
|
...et celui-ci:
Code Block |
---|
| xml | xml |
---|
title | mymodule_page.tpl |
---|
| xml |
---|
|
<h4>Welcome!</h4>
...
Click me!
|
...devient :
Code Block |
---|
| xml | xml |
---|
title | mymodule.tpl |
---|
borderStyle | solid |
---|
| xml |
---|
|
<h4>{l s='Welcome!' mod='mymodule'}</h4>
...
{l s='Click me!' mod='mymodule'}
|
...