Child pages
  • Creating a PrestaShop module

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Strings in TPL files will need to be turned into dynamic content, which Smarty will replace by the translation for the chosen language. In our sample module, this file:

Code Block
xmlxml
titlemymodule.tpl (partial)
borderStylesolid
xml
<li>
  <a href="{$base_dir}modules/mymodule/mymodule_page.php" title="Click this link">Click me!</a>
</li>

...becomes:

Code Block
xmlxml
titlemymodule.tpl (partial)
borderStylesolid
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>

...and this one:

Code Block
xmlxml
titlemymodule_page.tpl
xml
<h4>Welcome!</h4>
...
Click me!

...becomes:

Code Block
xmlxml
titlemymodule.tpl
borderStylesolid
xml
<h4>{l s='Welcome!' mod='mymodule'}</h4>
...
{l s='Click me!' mod='mymodule'}

...