mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
sync with EN
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.syntax.quotes">
|
||||
<title>Variables ins<6E>r<EFBFBD>es dans des cha<68>nes de caract<63>res</title>
|
||||
<para>
|
||||
@@ -8,7 +8,9 @@
|
||||
cha<68>nes entre guillemets, du moment que leur nom est exclusivement compos<6F>
|
||||
de chiffres, lettres, underscores et crochets. Si le nom de la variable
|
||||
contient tout autre caract<63>re (point, r<>f<EFBFBD>rence <20> un objet, etc.)
|
||||
la variable doit <20>tre entour<75>e d'apostrophes inverses (`).
|
||||
la variable doit <20>tre entour<75>e d'apostrophes inverses (`). Vous ne pouvez jamais
|
||||
ins<6E>rer de modifieurs, ils doivent toujours <20>tre appliquer <20> l'ext<78>rieur des
|
||||
guillemets.
|
||||
</para>
|
||||
<example>
|
||||
<title>Syntaxe d'insertion de variables dans des cha<68>nes</title>
|
||||
@@ -21,6 +23,7 @@ EXEMPLE DE SYNTAXE:
|
||||
{func var="test $foo[bar] test"} <-- comprends $foo[bar]
|
||||
{func var="test $foo.bar test"} <-- comprends $foo (not $foo.bar)
|
||||
{func var="test `$foo.bar` test"} <-- comprends $foo.bar
|
||||
{func var="test `$foo.bar` test"|escape} <-- modifieurs <20> l'ext<78>rieur des guillemets !
|
||||
|
||||
EXEMPLE PRATIQUE:
|
||||
{include file="subdir/$tpl_name.tpl"} <-- remplace $tpl_name avec la valeur
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.include">
|
||||
<title>include</title>
|
||||
<informaltable frame="all">
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
{* Le corps du template vient ici *}
|
||||
|
||||
{include file="footer.tpl" logo="http://mon.domaine.com/logo.gif"}</programlisting>
|
||||
{include file="footer.tpl" logo="http://mon.example.com/logo.gif"}</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Utilisez la syntaxe <link
|
||||
|
@@ -1,28 +1,35 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.ldelim">
|
||||
<title>ldelim,rdelim</title>
|
||||
<para>
|
||||
ldelim et rdelim sont utilis<69>s pour afficher les d<>limiteurs en tant
|
||||
que tels, dans notre cas "{" ou "}". Le moteur de template tentera
|
||||
toujours d'interpr<70>ter le contenu entre les d<>limiteurs, c'est donc
|
||||
une fa<66>on d'afficher ces derniers sans interf<72>rer avec Smarty.
|
||||
que tels, dans notre cas, "{" ou "}". Vous pouvez toujours utiliser <link
|
||||
linkend="language.function.literal">{literal}{/literal}</link> pour <20>chapper
|
||||
des blocks de texte.
|
||||
Voir aussi <link linkend="language.variables.smarty.ldelim">{$smarty.ldelim}</link>
|
||||
et <link linkend="language.variables.smarty.rdelim">{$smarty.rdelim}</link>.
|
||||
</para>
|
||||
<example>
|
||||
<title>ldelim, rdelim</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* Affiche les d<>limiteurs de template *}
|
||||
|
||||
{ldelim}nomFonction{rdelim} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
||||
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
{nomFonction} est la fa<66>on dont sont appel<65>es les fonctions dans Smarty !
|
||||
</programlisting>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.literal">
|
||||
<title>literal</title>
|
||||
<para>
|
||||
@@ -9,15 +9,19 @@
|
||||
de l'emplois d'<27>l<EFBFBD>ments tels que javascript, acolades et autres
|
||||
qui peuvent confondre le moteur de template. Tout le contenu situ<74>
|
||||
entre les balises {literal}{/literal} ne sera pas interpr<70>t<EFBFBD>, et
|
||||
affich<63> comme du contenu statique.
|
||||
affich<63> comme du contenu statique. Si vous voulez inclure des tags de template
|
||||
dans votre block lit<69>ral, utilisez plut<75>t <link
|
||||
linkend="language.function.ldelim">{ldelim}{rdelim}</link> pour <20>chapper
|
||||
les d<>limiteurs individuels.
|
||||
</para>
|
||||
<example>
|
||||
<title>balises literal</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{literal}
|
||||
<script language=javascript>
|
||||
<script language=javascript>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
function isblank(field) {
|
||||
if (field.value == '')
|
||||
{ return false; }
|
||||
@@ -27,10 +31,12 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// -->
|
||||
// -->
|
||||
|
||||
</script>
|
||||
{/literal}</programlisting>
|
||||
</script>
|
||||
{/literal}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.section">
|
||||
<title>section,sectionelse</title>
|
||||
<title>section, sectionelse</title>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -29,12 +29,10 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry>loop</entry>
|
||||
<entry>[$nom_variable]</entry>
|
||||
<entry>mixed</entry>
|
||||
<entry>Oui</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>le nom de la variable qui d<>termine le nombre de
|
||||
fois que la boucle sera ex<65>cut<75>e.
|
||||
</entry>
|
||||
<entry>valeur qui d<>termine le nombre de fois que la boucle sera ex<65>cut<75>e.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>start</entry>
|
||||
@@ -181,21 +179,21 @@ nom: John Smith<br>
|
||||
addresse: 253 N 45th<br>
|
||||
telephone: 555-555-5555<br>
|
||||
telephone portable: 555-555-5555<br>
|
||||
e-mail: john@mydomain.com<br>
|
||||
e-mail: john@myexample.com<br>
|
||||
<p>
|
||||
id: 1001<br>
|
||||
nom: Jack Jones<br>
|
||||
addresse: 417 Mulberry ln<br>
|
||||
telephone: 555-555-5555<br>
|
||||
telephone portable: 555-555-5555<br>
|
||||
e-mail: jack@mydomain.com<br>
|
||||
e-mail: jack@myexample.com<br>
|
||||
<p>
|
||||
id: 1002<br>
|
||||
nom: Jane Munson<br>
|
||||
addresse: 5605 apple st<br>
|
||||
telephone: 555-555-5555<br>
|
||||
telephone portable: 555-555-5555<br>
|
||||
e-mail: jane@mydomain.com<br>
|
||||
e-mail: jane@myexample.com<br>
|
||||
<p></programlisting>
|
||||
</example>
|
||||
|
||||
@@ -216,15 +214,15 @@ SORTIE:
|
||||
nom: John Smith<br>
|
||||
telephone: 555-555-5555<br>
|
||||
portable: 555-555-5555<br>
|
||||
e-mail: john@mydomain.com<p>
|
||||
e-mail: john@myexample.com<p>
|
||||
nom: Jack Jones<br>
|
||||
telephone: 555-555-5555<br>
|
||||
portable: 555-555-5555<br>
|
||||
e-mail: jack@mydomain.com<p>
|
||||
e-mail: jack@myexample.com<p>
|
||||
nom: Jane Munson<br>
|
||||
telephone: 555-555-5555<br>
|
||||
portable: 555-555-5555<br>
|
||||
e-mail: jane@mydomain.com<p></programlisting>
|
||||
e-mail: jane@myexample.com<p></programlisting>
|
||||
</example>
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerlad Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerlad Status: ready -->
|
||||
<sect1 id="language.function.strip">
|
||||
<title>strip</title>
|
||||
<para>
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
SORTIE:
|
||||
|
||||
<table border=0><tr><td><A HREF="http://mon.domaine.com"><font color="red">Un test</font></A></td></tr></table>
|
||||
<table border=0><tr><td><A HREF="http://mon.example.com"><font color="red">Un test</font></A></td></tr></table>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
Reference in New Issue
Block a user