Prestashop - 1.4 Uživatelská příručka Strana 24

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 36
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 23
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:
mymodule.tpl (partial)
<li>
<a href="{$base_dir}modules/mymodule/mymodule_page.php" title="Click this
link">Click me!</a>
</li>
...becomes:
mymodule.tpl (partial)
<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:
mymodule_page.tpl
<h4>Welcome!</h4>
...
Click me!
...becomes:
mymodule.tpl
<h4>{l s='Welcome!' mod='mymodule'}</h4>
...
{l s='Click me!' mod='mymodule'}
The translation tool needs the mod parameter in order to match the string
to translate with its translation.
Strings are delimited with single quotes. If a string contains single quotes,
they should be escaped using a backslash ().
This way, strings can be directly translated inside PrestaShop: go to the
"Tools" tab, its "Translations" sub-tab, and in the "Modify translations"
drop-down menu, choose "Module translations", then click the French flag
in order to translate modules into French.
The next page displays all the strings for all the currently-installed
modules. Modules that have all their strings already translated have their
fieldset closed, whereas if at least one string is missing in a module's
translation, its fieldset is expanded.
In order to translate your module's strings (the ones that were "marked"
Zobrazit stránku 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 35 36

Komentáře k této Příručce

Žádné komentáře