mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
sync with EN
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.capitalize">
|
<sect1 id="language.modifier.capitalize">
|
||||||
<title>capitalize</title>
|
<title>capitalize</title>
|
||||||
|
<para>
|
||||||
|
Met la premi<6D>re lettre de chaque mot d'une variable en majuscule.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -31,18 +35,13 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Met la premi<6D>re lettre de chaque mot d'une variable en majuscule.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>Mise en majuscule</title>
|
<title>Mise en majuscule</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', 'Le nouveau php5 est vraiment performant !');
|
$smarty->assign('titreArticle', 'Le nouveau php5 est vraiment performant !');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
@@ -71,9 +70,10 @@ Le Nouveau Php5 Est Vraiment Performant !
|
|||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="language.modifier.lower">lower</link> et
|
<link linkend="language.modifier.lower">lower</link> et
|
||||||
<link linkend="language.modifier.upper">upper</link>
|
<link linkend="language.modifier.upper">upper</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,8 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.cat">
|
<sect1 id="language.modifier.cat">
|
||||||
<title>cat</title>
|
<title>cat</title>
|
||||||
|
<para>
|
||||||
|
Cette valeur est concat<61>n<EFBFBD>e <20> la variable donn<6E>e.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -30,22 +34,19 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Cette valeur est concat<61>n<EFBFBD>e <20> la variable donn<6E>e.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>cat</title>
|
<title>cat</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('articleTitle', "'Les devins ont pr<70>vus que le monde existera toujours");
|
$smarty->assign('articleTitle', "'Les devins ont pr<70>vus que le monde existera toujours");
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est:
|
Ou le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -62,6 +63,7 @@ Les devins ont pr
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,8 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.count.characters">
|
<sect1 id="language.modifier.count.characters">
|
||||||
<title>count_characters</title>
|
<title>count_characters</title>
|
||||||
|
<para>
|
||||||
|
Compte le nombre de caract<63>res dans une variable.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -30,24 +34,19 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Compte le nombre de caract<63>res dans une variable.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>count_characters</title>
|
<title>count_characters</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', 'Vagues de froid li<6C>es <20> la temp<6D>rature.');
|
$smarty->assign('titreArticle', 'Vagues de froid li<6C>es <20> la temp<6D>rature.');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est:
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -69,9 +68,9 @@ Vagues de froid li
|
|||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="language.modifier.count.paragraphs">count_paragraphs</link>,
|
<link linkend="language.modifier.count.words">count_words</link>,
|
||||||
<link linkend="language.modifier.count.sentences">count_sentences</link> et
|
<link linkend="language.modifier.count.sentences">count_sentences</link> et
|
||||||
<link linkend="language.modifier.count.words">count_words</link>.
|
<link linkend="language.modifier.count.paragraphs">count_paragraphs</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.count.paragraphs">
|
<sect1 id="language.modifier.count.paragraphs">
|
||||||
<title>count_paragraphs</title>
|
<title>count_paragraphs</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -11,14 +12,16 @@
|
|||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', 'La guerre apporte la paix, au prix de la vie de certains innocents.');
|
$smarty->assign('articleTitle',
|
||||||
$smarty->display('index.tpl');
|
"War Dims Hope for Peace. Child's Death Ruins Couple's Holiday.\n\n
|
||||||
|
Man is Fatally Slain. Death Causes Loneliness, Feeling of Isolation."
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est:
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -40,6 +43,7 @@ La guerre apporte la paix, au prix de la vie des innocents.
|
|||||||
<link linkend="language.modifier.count.words">count_words</link>.
|
<link linkend="language.modifier.count.words">count_words</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.count.sentences">
|
<sect1 id="language.modifier.count.sentences">
|
||||||
<title>count_sentences</title>
|
<title>count_sentences</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -11,16 +12,17 @@
|
|||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', 'Deux navires rentrent en
|
$smarty->assign('articleTitle',
|
||||||
collision - Un des deux coule. Des vaches enrag<61>es blessent un fermier <20>
|
'Two Soviet Ships Collide - One Dies.
|
||||||
coups de haches.');
|
Enraged Cow Injures Farmer with Axe.'
|
||||||
$smarty->display('index.tpl');
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est :
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.count.words">
|
<sect1 id="language.modifier.count.words">
|
||||||
<title>count_words</title>
|
<title>count_words</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -12,15 +13,13 @@
|
|||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', 'Un anneau pour les gouverner tous.');
|
$smarty->assign('TitreArticle', 'Un anneau pour les gouverner tous.');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est:
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@@ -1,8 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.date.format">
|
<sect1 id="language.modifier.date.format">
|
||||||
<title>date_format</title>
|
<title>date_format</title>
|
||||||
|
<para>
|
||||||
|
Formate une date / heure au format
|
||||||
|
<ulink url="&url.php-manual;strftime">strftime()</ulink> donn<6E>.
|
||||||
|
Les dates peuvent <20>tre pass<73>es <20> smarty en tant que
|
||||||
|
<ulink url="&url.php-manual;function.time">timestamp</ulink> unix,
|
||||||
|
timestamp mysql ou comme cha<68>ne quelconque contenant mois jour ann<6E>e
|
||||||
|
(interpr<70>table par <ulink url="&url.php-manual;strtotime">strtotime()</ulink>).
|
||||||
|
Les concepteurs de templates peuvent utiliser date_format pour contr<74>ler
|
||||||
|
parfaitement le format de sortie de la date.
|
||||||
|
Si la date pass<73>e <20> <command>date_format</command> est vide, et qu'un
|
||||||
|
second param<61>tre est donn<6E>, ce dernier sera utilis<69> comme <20>tant la date <20> formater.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -37,182 +50,191 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Formate une date / heure au format
|
<note>
|
||||||
<ulink url="&url.php-manual;strftime">strftime()</ulink> donn<6E>.
|
<para>
|
||||||
Les dates peuvent <20>tre pass<73>es <20> smarty en tant que timestamp unix,
|
Depuis Smarty 2.6.10, les valeurs num<75>riques pass<73>es <20> date_format
|
||||||
timestamp mysql ou comme cha<68>ne quelconque contenant mois jour ann<6E>e
|
sont <emphasis>toujours</emphasis> (except<70> pour les timestamps mysql, voir
|
||||||
(interpr<70>table par <ulink url="&url.php-manual;strtotime">strtotime()</ulink>).
|
ci-dessous) interpr<70>t<EFBFBD>es comme un timestamp Unix.
|
||||||
Les concepteurs de templates peuvent utiliser date_format pour contr<74>ler
|
</para>
|
||||||
parfaitement le format de sortie de la date.
|
<para>
|
||||||
Si la date pass<73>e <20> date_format est vide, et qu'un second param<61>tre
|
Avant la version 2.6.10 de Smarty, les cha<68>nes num<75>riques qui <20>taient
|
||||||
est donn<6E>, ce dernier sera utilis<69> comme <20>tant la date <20> formater.
|
<20>galement analysables par strtotime() en PHP (comme "YYYYMMDD"),
|
||||||
</para>
|
<20>taient, parfois, d<>pendament de l'impl<70>mentation de strtotime(),
|
||||||
<example>
|
interpr<70>t<EFBFBD>es en tant que des cha<68>nes date et non des timestamps.
|
||||||
<title>date_format</title>
|
</para>
|
||||||
<programlisting role="php">
|
<para>
|
||||||
|
La seule exception est les timestamps MySQL : Ils sont uniquement num<75>riques
|
||||||
|
et d'une longueur de 14 caract<63>res ("YYYYMMDDHHMMSS"). Les timestamps
|
||||||
|
MySQL ont la priorit<69> sur les timestamps Unix.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</para>
|
||||||
|
<example>
|
||||||
|
<title>date_format</title>
|
||||||
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('hier', strtotime('-1 day'));
|
$smarty->assign('hier', strtotime('-1 day'));
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est:
|
O<> le template est (utilisation de <link linkend="language.variables.smarty.now">$smarty.now</link>) :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{$smarty.now|date_format}
|
{$smarty.now|date_format}
|
||||||
{$smarty.now|date_format:"%A, %B %e, %Y"}
|
{$smarty.now|date_format:"%D"}
|
||||||
{$smarty.now|date_format:"%H:%M:%S"}
|
{$smarty.now|date_format:"%I:%M %p"}
|
||||||
{$hier|date_format}
|
{$yesterday|date_format}
|
||||||
{$hier|date_format:"%A, %B %e, %Y"}
|
{$yesterday|date_format:"%A, %B %e, %Y"}
|
||||||
{$hier|date_format:"%H:%M:%S"}
|
{$yesterday|date_format:"%H:%M:%S"}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ce qui donne <20> l'<27>cran:
|
Ce qui donne <20> l'<27>cran:
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
Feb 6, 2001
|
Feb 6, 2001
|
||||||
Tuesday, February 6, 2001
|
02/06/01
|
||||||
14:33:00
|
02:33 pm
|
||||||
Feb 5, 2001
|
Feb 5, 2001
|
||||||
Monday, February 5, 2001
|
Monday, February 5, 2001
|
||||||
14:33:00
|
14:33:00
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
date_format conversion specifiers:
|
Conversion de <command>date_format</command> :
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%a - Abr<62>viation du jour de la semaine, selon les param<61>tres locaux.
|
%a - Abr<62>viation du jour de la semaine, selon les param<61>tres locaux.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%A - Nom du jour de la semaine, selon les param<61>tres locaux.
|
%A - Nom du jour de la semaine, selon les param<61>tres locaux.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%b - Abr<62>viation du nom du jour, selon les param<61>tres locaux.
|
%b - Abr<62>viation du nom du jour, selon les param<61>tres locaux.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%B - Nom complet du mois, selon les param<61>tres locaux.
|
%B - Nom complet du mois, selon les param<61>tres locaux.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%c - Pr<50>f<EFBFBD>rences d'affichage selon les param<61>tres locaux.
|
%c - Pr<50>f<EFBFBD>rences d'affichage selon les param<61>tres locaux.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%C - Si<53>cle, (L'ann<6E>e divis<69>e par 100 et tronqu<71>e comme un entier, de 00 <20> 99)
|
%C - Si<53>cle, (L'ann<6E>e divis<69>e par 100 et tronqu<71>e comme un entier, de 00 <20> 99)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%d - Jour du mois, en tant que nombre d<>cimal (de 00 <20> 31)
|
%d - Jour du mois, en tant que nombre d<>cimal (de 00 <20> 31)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%D - m<>me chose que %m/%d/%y
|
%D - m<>me chose que %m/%d/%y
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%e - Jour du mois en tant que nombre d<>cimal. Un chiffre unique est pr<70>c<EFBFBD>d<EFBFBD> par
|
%e - Jour du mois en tant que nombre d<>cimal. Un chiffre unique est pr<70>c<EFBFBD>d<EFBFBD> par
|
||||||
un espace (de 1 <20> 31)
|
un espace (de 1 <20> 31)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%g - Position de la semaine dans le si<73>cle [00,99]
|
%g - Position de la semaine dans le si<73>cle [00,99]
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%G - Position de la semaine, incluant le si<73>cle [0000,9999]
|
%G - Position de la semaine, incluant le si<73>cle [0000,9999]
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%h - identique <20> %b
|
%h - identique <20> %b
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%H - L'heure en tant que d<>cimale, en utilisant une horloge sur 24 (de 00 <20> 23)
|
%H - L'heure en tant que d<>cimale, en utilisant une horloge sur 24 (de 00 <20> 23)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%I - L'heure en tant que d<>cimale en utilisant une horloge sur 12 (de 01 to 12)
|
%I - L'heure en tant que d<>cimale en utilisant une horloge sur 12 (de 01 to 12)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%j - jour de l'ann<6E>e (de 001 <20> 366)
|
%j - jour de l'ann<6E>e (de 001 <20> 366)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%k - Heure (horloge sur 24). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 0 <20> 23)
|
%k - Heure (horloge sur 24). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 0 <20> 23)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%l - Heure (horloge sur 12). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 1 <20> 12)
|
%l - Heure (horloge sur 12). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 1 <20> 12)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%m - Mois en tant que nombre d<>cimal (de 01 <20> 12)
|
%m - Mois en tant que nombre d<>cimal (de 01 <20> 12)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%M - Minute en tant que nombre d<>cimal
|
%M - Minute en tant que nombre d<>cimal
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%n - Retour chariot (nouvelle ligne).
|
%n - Retour chariot (nouvelle ligne).
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%p - soit am soit pm selon l'heure donn<6E>e, ou alors leurs correspondances locales.
|
%p - soit am soit pm selon l'heure donn<6E>e, ou alors leurs correspondances locales.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%r - heure en notation a.m. et p.m.
|
%r - heure en notation a.m. et p.m.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%R - Heure au format 24 heures
|
%R - Heure au format 24 heures
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%S - Secondes en tant que nombre d<>cimal.
|
%S - Secondes en tant que nombre d<>cimal.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%t - Caract<63>re tabulation.
|
%t - Caract<63>re tabulation.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%T - Heure courante, <20>quivalent <20> %H:%M:%S
|
%T - Heure courante, <20>quivalent <20> %H:%M:%S
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%u - Jour de la semaine en tant que nombre d<>cimal [1,7], ou 1 repr<70>sente le lundi.
|
%u - Jour de la semaine en tant que nombre d<>cimal [1,7], ou 1 repr<70>sente le lundi.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%U - Le num<75>ro de la semaine en nombre d<>cimal, utilisant le premier dimanche
|
%U - Le num<75>ro de la semaine en nombre d<>cimal, utilisant le premier dimanche
|
||||||
en tant que premier jour de la premi<6D>re semaine.
|
en tant que premier jour de la premi<6D>re semaine.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%V - Le num<75>ro de la semaine de l'ann<6E>e courante selon la norme ISO 8601:1988,
|
%V - Le num<75>ro de la semaine de l'ann<6E>e courante selon la norme ISO 8601:1988,
|
||||||
de 01 <20> 53, ou la semaine 1 est la premi<6D>re semaine qui dispose au minimum
|
de 01 <20> 53, ou la semaine 1 est la premi<6D>re semaine qui dispose au minimum
|
||||||
de 4 jours dans l'ann<6E>e courante et ou Lundi est le premier jour
|
de 4 jours dans l'ann<6E>e courante et ou Lundi est le premier jour
|
||||||
de cette semaine.
|
de cette semaine.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%w - Jour de la semaine en tant que nombre d<>cimal, dimanche <20>tant 0
|
%w - Jour de la semaine en tant que nombre d<>cimal, dimanche <20>tant 0
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%W - Le num<75>ro de la semaine de l'ann<6E>e courante en tant que nombre d<>cimal,
|
%W - Le num<75>ro de la semaine de l'ann<6E>e courante en tant que nombre d<>cimal,
|
||||||
ou Lundi est le premier jour de la premi<6D>re semaine.
|
ou Lundi est le premier jour de la premi<6D>re semaine.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%x - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de la date selon les param<61>tres locaux.
|
%x - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de la date selon les param<61>tres locaux.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%X - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de l'heure selon les param<61>tres locaux, sans la
|
%X - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de l'heure selon les param<61>tres locaux, sans la
|
||||||
date.
|
date.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%y - L'ann<6E>e en tant que nombre d<>cimal, sans le si<73>cle. (de 00 <20> 99)
|
%y - L'ann<6E>e en tant que nombre d<>cimal, sans le si<73>cle. (de 00 <20> 99)
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%Y - L'ann<6E>e en tant que nombre d<>cimal, avec le si<73>cle.
|
%Y - L'ann<6E>e en tant que nombre d<>cimal, avec le si<73>cle.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%Z - Zone horraire, nom ou abr<62>viation
|
%Z - Zone horraire, nom ou abr<62>viation
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
%% - Un caract<63>re lit<69>ral `%'
|
%% - Un caract<63>re lit<69>ral `%'
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
<note>
|
<note>
|
||||||
<title>Note aux d<>veloppeurs</title>
|
<title>Note aux d<>veloppeurs</title>
|
||||||
<para>
|
<para>
|
||||||
date_format est un alias de la fonction
|
<command>date_format</command> est un alias de la fonction PHP
|
||||||
PHP <ulink url="&url.php-manual;strftime">strftime()</ulink>.
|
PHP <ulink url="&url.php-manual;strftime">strftime()</ulink>.
|
||||||
Il est probable que vous disposiez de plus ou moins d'options
|
Il est probable que vous disposiez de plus ou moins d'options
|
||||||
disponibles selon le syst<73>me sur lequel PHP a <20>t<EFBFBD> compil<69>.
|
disponibles selon le syst<73>me sur lequel PHP a <20>t<EFBFBD> compil<69>.
|
||||||
@@ -224,6 +246,7 @@ en tant que premier jour de la premi
|
|||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="language.variables.smarty.now">$smarty.now</link>,
|
<link linkend="language.variables.smarty.now">$smarty.now</link>,
|
||||||
|
la <ulink url="&url.php-manual;strftime">fonction PHP strftime()</ulink>,
|
||||||
<link linkend="language.function.html.select.date">{html_select_date}</link> et
|
<link linkend="language.function.html.select.date">{html_select_date}</link> et
|
||||||
les <link linkend="tips.dates">astuces sur les dates</link>.
|
les <link linkend="tips.dates">astuces sur les dates</link>.
|
||||||
</para>
|
</para>
|
||||||
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.default">
|
<sect1 id="language.modifier.default">
|
||||||
<title>default</title>
|
<title>default</title>
|
||||||
|
<para>
|
||||||
|
Utilis<69> pour d<>finir une valeur par d<>faut <20> une variable.
|
||||||
|
Si la variable est vide ou ind<6E>finie, la valeur donn<6E>e est affich<63>e
|
||||||
|
en lieu et place. Default attends un seul argument.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -31,24 +37,19 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Utilis<69> pour d<>finir une valeur par d<>faut <20> une variable.
|
|
||||||
Si la variable est vide ou ind<6E>finie, la valeur donn<6E>e est affich<63>e
|
|
||||||
en lieu et place. Default attends un seul argument.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>default</title>
|
<title>default</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<EFBFBD> index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -70,6 +71,7 @@ pas de titre
|
|||||||
et <link linkend="tips.blank.var.handling">la gestion de l'effacement des variables</link>.
|
et <link linkend="tips.blank.var.handling">la gestion de l'effacement des variables</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,8 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.escape">
|
<sect1 id="language.modifier.escape">
|
||||||
<title>escape</title>
|
<title>escape</title>
|
||||||
|
<para>
|
||||||
|
"Echappe" les caract<63>res sp<73>ciaux html, d'url, pour
|
||||||
|
les quotes d'une cha<68>ne, les valeurs
|
||||||
|
hexad<61>cimales, les entit<69>s hexad<61>cimales ou javascript.
|
||||||
|
Par d<>faut, ce param<61>tre est html.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="6">
|
<tgroup cols="6">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -34,25 +41,21 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
"Echappe" les caract<63>res sp<73>ciaux html, d'url, pour
|
|
||||||
les quotes d'une cha<68>ne, les valeurs
|
|
||||||
hexad<61>cimales, les entit<69>s hexad<61>cimales ou javascript.
|
|
||||||
Par d<>faut, ce param<61>tre est html.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>escape</title>
|
<title>escape</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
|
$smarty->assign('articleTitle',
|
||||||
$smarty->display('index.tpl');
|
"'Stiff Opposition Expected to Casketless Funeral Plan'"
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<EFBFBD> index.tpl est:
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -82,8 +85,8 @@ Ce qui donne
|
|||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
Voir aussi la
|
Voir aussi la
|
||||||
<link linkend="language.escaping">d<EFBFBD>sactivation de l'analyse de Smarty</link>
|
<link linkend="language.escaping">d<EFBFBD>sactivation de l'analyse de Smarty</link> et
|
||||||
et le <link linkend="tips.obfuscating.email">mascage des adresses E-mail</link>.
|
le <link linkend="tips.obfuscating.email">mascage des adresses E-mail</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@@ -1,8 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.indent">
|
<sect1 id="language.modifier.indent">
|
||||||
<title>indent</title>
|
<title>indent</title>
|
||||||
|
<para>
|
||||||
|
Indente chacune des lignes d'une cha<68>ne. Comme param<61>tre optionnel,
|
||||||
|
vous pouvez sp<73>cifier le nombre de caract<63>res <20> utiliser pour l'indentation (4 par d<>faut).
|
||||||
|
Comme second param<61>tre optionnel, vous
|
||||||
|
pouvez sp<73>cifier le caract<63>re <20> utiliser pour l'indentation (utilisez
|
||||||
|
"\t" pour les tabulations).
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -37,26 +45,22 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Indente chacune des lignes d'une cha<68>ne. Comme param<61>tre optionnel,
|
|
||||||
vous pouvez sp<73>cifier le nombre de caract<63>res <20> utiliser pour l'indentation (4 par d<>faut).
|
|
||||||
Comme second param<61>tre optionnel, vous
|
|
||||||
pouvez sp<73>cifier le caract<63>re <20> utiliser pour l'indentation (utilisez
|
|
||||||
"\t" pour les tabulations).
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>indent</title>
|
<title>indent</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', 'Il fera noir cette nuit.');
|
$smarty->assign('articleTitle',
|
||||||
$smarty->display('index.tpl');
|
'NJ judge to rule on nude beach.
|
||||||
|
Sun or rain expected today, dark tonight.
|
||||||
|
Statistics show that teen pregnancy drops off significantly after 25.'
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est:
|
Ou le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -74,20 +78,28 @@ Ce qui donne
|
|||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
Il fera noir cette nuit.
|
NJ judge to rule on nude beach.
|
||||||
|
Sun or rain expected today, dark tonight.
|
||||||
|
Statistics show that teen pregnancy drops off significantly after 25.
|
||||||
|
|
||||||
Il fera noir cette nuit.
|
NJ judge to rule on nude beach.
|
||||||
|
Sun or rain expected today, dark tonight.
|
||||||
|
Statistics show that teen pregnancy drops off significantly after 25.
|
||||||
|
|
||||||
Il fera noir cette nuit.
|
NJ judge to rule on nude beach.
|
||||||
|
Sun or rain expected today, dark tonight.
|
||||||
|
Statistics show that teen pregnancy drops off significantly after 25.
|
||||||
|
|
||||||
Il fera noir cette nuit.
|
NJ judge to rule on nude beach.
|
||||||
|
Sun or rain expected today, dark tonight.
|
||||||
|
Statistics show that teen pregnancy drops off significantly after 25.
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="language.modifier.strip">strip</link>
|
<link linkend="language.modifier.strip">strip</link> et
|
||||||
et <link linkend="language.modifier.spacify">spacify</link>.
|
<link linkend="language.modifier.spacify">spacify</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.lower">
|
<sect1 id="language.modifier.lower">
|
||||||
<title>lower</title>
|
<title>lower</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -11,14 +12,14 @@
|
|||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est :
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -42,6 +43,7 @@ deux suspects se sont sauv
|
|||||||
<link linkend="language.modifier.capitalize">Capitalize</link>.
|
<link linkend="language.modifier.capitalize">Capitalize</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.nl2br">
|
<sect1 id="language.modifier.nl2br">
|
||||||
<title>nl2br</title>
|
<title>nl2br</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -12,14 +13,16 @@
|
|||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', "Pluie ou soleil attendu\naujourd'hui, nuit noire");
|
$smarty->assign('articleTitle',
|
||||||
$smarty->display('index.tpl');
|
"Sun or rain expected\ntoday, dark tonight"
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<EFBFBD> index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.regex.replace">
|
<sect1 id="language.modifier.regex.replace">
|
||||||
<title>regex_replace</title>
|
<title>regex_replace</title>
|
||||||
|
<para>
|
||||||
|
Un rechercher / remplacer avec une expression r<>guli<6C>re. Utilise la m<>me
|
||||||
|
syntaxe que la fonction PHP
|
||||||
|
<ulink url="&url.php-manual;preg_replace">preg_replace()</ulink>.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -37,24 +43,19 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Un rechercher / remplacer avec une expression r<>guli<6C>re. Utilise la m<>me
|
|
||||||
syntaxe que la fonction PHP <ulink
|
|
||||||
url="&url.php-manual;preg_replace">preg_replace()</ulink>.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>regex_replace</title>
|
<title>regex_replace</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('TitreArticle', "L'infertilit<69> est un maux grandissant\n, disent les experts.");
|
$smarty->assign('TitreArticle', "L'infertilit<69> est un maux grandissant\n, disent les experts.");
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est :
|
Ou le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@@ -1,8 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.replace">
|
<sect1 id="language.modifier.replace">
|
||||||
<title>replace</title>
|
<title>replace</title>
|
||||||
|
<para>
|
||||||
|
Un simple remplacement de cha<68>ne de caract<63>res. Ceci est l'<27>quivalent
|
||||||
|
de la fonction PHP <ulink url="&url.php-manual;str_replace">str_replace()</ulink>.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -37,29 +42,25 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Un simple remplacement de cha<68>ne de caract<63>res. Ceci est l'<27>quivalent
|
|
||||||
dela fonction PHP <ulink url="&url.php-manual;str_replace">str_replace()</ulink>.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>replace</title>
|
<title>replace</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est :
|
Ou le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|replace:"Garden":"Vineyard"}
|
{$titreArticle|replace:'Garden':'Vineyard'}
|
||||||
{$titreArticle|replace:" ":" "}
|
{$titreArticle|replace:' ':' '}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -79,6 +80,7 @@ Child's Stool Great for Use in Garden.
|
|||||||
<link linkend="language.modifier.escape">escape</link>.
|
<link linkend="language.modifier.escape">escape</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.spacify">
|
<sect1 id="language.modifier.spacify">
|
||||||
<title>spacify</title>
|
<title>spacify</title>
|
||||||
|
<para>
|
||||||
|
spacify est un moyen pour ins<6E>rer un espace entre tous les caract<63>res
|
||||||
|
d'une variable. Optionnellement, vous pouvez lui passer un caract<63>re
|
||||||
|
(ou une cha<68>ne) diff<66>rent de l'espace <20> ins<6E>rer.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -30,25 +36,20 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
spacify est un moyen pour ins<6E>rer un espace entre tous les caract<63>res
|
|
||||||
d'une variable. Optionnellement, vous pouvez lui passer un caract<63>re
|
|
||||||
(ou une cha<68>ne) diff<66>rent de espace <20> ins<6E>rer.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>spacify</title>
|
<title>spacify</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', 'Quelque chose s\'est mal pass<73> et <20> provoqu<71>
|
$smarty->assign('titreArticle', 'Quelque chose s\'est mal pass<73> et <20> provoqu<71>
|
||||||
cet accident, disent les experts');
|
cet accident, disent les experts');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.string.format">
|
<sect1 id="language.modifier.string.format">
|
||||||
<title>string_format</title>
|
<title>string_format</title>
|
||||||
|
<para>
|
||||||
|
Un moyen pour formater les cha<68>nes de caract<63>res, comme par exemple les
|
||||||
|
nombres d<>cimaux. Utilise la syntaxe de <ulink url="&url.php-manual;sprintf">sprintf()</ulink>
|
||||||
|
pour formater les <20>l<EFBFBD>ments.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -30,24 +36,19 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Un moyen pour formater les cha<68>nes de caract<63>res, comme par exemple les
|
|
||||||
nombres d<>cimaux. Utilise la syntaxe de <ulink url="&url.php-manual;sprintf">sprintf</ulink>
|
|
||||||
pour formater les <20>l<EFBFBD>ments.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>string_format</title>
|
<title>string_format</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('nombre', 23.5787446);
|
$smarty->assign('nombre', 23.5787446);
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
ou index.tpl est :
|
o<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
@@ -1,8 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.strip.tags">
|
<sect1 id="language.modifier.strip.tags">
|
||||||
<title>strip_tags</title>
|
<title>strip_tags</title>
|
||||||
|
<para>
|
||||||
|
Supprime toutes les balises, et plus g<>n<EFBFBD>ralement tout ce qui se trouve
|
||||||
|
entre < et >.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -30,23 +35,22 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Supprime toutes les balises, et plus g<>n<EFBFBD>ralement tout ce qui se trouve
|
|
||||||
entre < et >.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>strip_tags</title>
|
<title>strip_tags</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau <font face=\"helvetica\">rein</font> d'un p<>re qu'elle n'a pas vu depuis <b>des ann<6E>es</b>.");
|
$smarty->assign('articleTitle',
|
||||||
$smarty->display('index.tpl');
|
"Blind Woman Gets <font face=\"helvetica\">New
|
||||||
|
Kidney</font> from Dad she Hasn't Seen in <b>years</b>."
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -60,13 +64,14 @@ Ce qui donne en sortie :
|
|||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
Une femme aveugle obtient un nouveau <font face=\"helvetica\">rein</font> d'un p<>re qu'elle n'a pas vu depuis <b>des ann<6E>es</b>.
|
Blind Woman Gets <font face="helvetica">New Kidney</font> from Dad she Hasn't Seen in <b>years</b>.
|
||||||
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es .
|
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years .
|
||||||
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.
|
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.2 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.strip">
|
<sect1 id="language.modifier.strip">
|
||||||
<title>strip</title>
|
<title>strip</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -11,8 +12,7 @@
|
|||||||
<title>Note</title>
|
<title>Note</title>
|
||||||
<para>
|
<para>
|
||||||
Si vous voulez r<>aliser cette action sur un bloc complet du template,
|
Si vous voulez r<>aliser cette action sur un bloc complet du template,
|
||||||
utilisez la <link
|
utilisez la fonction <link linkend="language.function.strip">{strip}</link>.
|
||||||
linkend="language.function.strip">fonction strip</link>.
|
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<example>
|
<example>
|
||||||
@@ -28,27 +28,30 @@ $smarty->display('index.tpl');
|
|||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|strip}
|
{$titreArticle|strip}
|
||||||
{$titreArticle|strip:"&nbsp;"}
|
{$titreArticle|strip:" "}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ce qui donne en sortie :
|
Ce qui donne en sortie :
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Une r<>union autour
|
Une r<>union autour
|
||||||
d'un feu de chemin<69>e est toujours agr<67>able.
|
d'un feu de chemin<69>e est toujours agr<67>able.
|
||||||
Une r<>union autour d'un feu de chemin<69>e est toujours agr<67>able.
|
Une r<>union autour d'un feu de chemin<69>e est toujours agr<67>able.
|
||||||
Une&nbsp;r<>union&nbsp;autour&nbsp;d'un&nbsp;feu&nbsp;de&nbsp;chemin<69>e&nbsp;est&nbsp;toujours
|
Une r<>union autour d'un feu de chemin<69>e est toujours
|
||||||
&nbsp;agr<67>able.
|
agr<67>able.
|
||||||
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,8 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.truncate">
|
<sect1 id="language.modifier.truncate">
|
||||||
<title>truncate</title>
|
<title>truncate</title>
|
||||||
|
<para>
|
||||||
|
Tronque une variable <20> une certaine longueur, par d<>faut 80.
|
||||||
|
Un second param<61>tre optionnel permet de sp<73>cifier une cha<68>ne <20> afficher
|
||||||
|
<20> la fin de la variable une fois tronqu<71>e. Les caract<63>res de fin sont
|
||||||
|
inclus dans la longueur de la cha<68>ne <20> tronquer. Par d<>faut,
|
||||||
|
truncate tentera de couper la cha<68>ne <20> la fin d'un mot. Si vous voulez
|
||||||
|
tronquer la cha<68>ne au caract<63>re exact, donnez la valeur true au
|
||||||
|
dernier param<61>tre optionnel.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -33,8 +43,8 @@
|
|||||||
<entry>cha<EFBFBD>ne de caract<63>re</entry>
|
<entry>cha<EFBFBD>ne de caract<63>re</entry>
|
||||||
<entry>Non</entry>
|
<entry>Non</entry>
|
||||||
<entry>...</entry>
|
<entry>...</entry>
|
||||||
<entry>Le texte <EFBFBD> rajouter lorsque l'on effectue un
|
<entry>Le texte qui remplace le texte tronqu<71>. Sa longueur n'est PAS
|
||||||
troncage.</entry>
|
incluse dans la configuration de la longueur <20> tronquer.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>3</entry>
|
<entry>3</entry>
|
||||||
@@ -45,31 +55,31 @@
|
|||||||
le dernier mot (false), ou au caract<63>re exact (true).
|
le dernier mot (false), ou au caract<63>re exact (true).
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>4</entry>
|
||||||
|
<entry>bool<EFBFBD>en</entry>
|
||||||
|
<entry>Non</entry>
|
||||||
|
<entry>false</entry>
|
||||||
|
<entry>Ceci d<>termine si le troncage intervient <20> la fin de la
|
||||||
|
cha<68>ne (false), ou au milieu de la cha<68>ne (true). Notez que si
|
||||||
|
ceci vaut true, alors les limites de mots sont ignor<6F>es.</entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Tronque une variable <20> une certaine longueur, par d<>faut 80.
|
|
||||||
Un second param<61>tre optionnel permet de sp<73>cifier une cha<68>ne <20> afficher
|
|
||||||
<20> la fin de la variable une fois tronqu<71>e. Les caract<63>res de fin sont
|
|
||||||
inclus dans la longueur de la cha<68>ne <20> tronquer. Par d<>faut,
|
|
||||||
truncate tentera de couper la cha<68>ne <20> la fin d'un mot. Si vous voulez
|
|
||||||
tronquer la cha<68>ne au caract<63>re exact, donnez la valeur true au
|
|
||||||
dernier param<61>tre optionnel.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>truncate</title>
|
<title>truncate</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', 'Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.');
|
$smarty->assign('titreArticle', 'Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.');
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Ou index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -97,6 +107,7 @@ Deux soeurs r
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.upper">
|
<sect1 id="language.modifier.upper">
|
||||||
<title>upper</title>
|
<title>upper</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -11,15 +12,15 @@
|
|||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('titreArticle', "Si l'attaque n'est pas mise en place
|
$smarty->assign('titreArticle', "Si l'attaque n'est pas mise en place
|
||||||
rapidement, cel<65> risque de durer longtemps.");
|
rapidement, cel<65> risque de durer longtemps.");
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est:
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -41,6 +42,7 @@ SI L'ATTAQUE N'EST PAS MISE EN PLACE RAPIDEMENT, CEL
|
|||||||
<link linkend="language.modifier.capitalize">capitalize</link>.
|
<link linkend="language.modifier.capitalize">capitalize</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
|
@@ -1,8 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.modifier.wordwrap">
|
<sect1 id="language.modifier.wordwrap">
|
||||||
<title>wordwrap</title>
|
<title>wordwrap</title>
|
||||||
|
<para>
|
||||||
|
Ajuste une cha<68>ne de caract<63>res <20> une taille de colonne, par d<>faut 80.
|
||||||
|
Un second param<61>tre optionnel vous permet de sp<73>cifier la cha<68>ne <20> utiliser
|
||||||
|
pour l'ajustement <20> la nouvelle ligne (retour chariot \n par d<>faut).
|
||||||
|
Par d<>faut, wordwrap tente un ajustement <20> la fin d'un mot. Si vous voulez
|
||||||
|
autoriser le d<>coupage des mots pour un ajustement au caract<63>re pr<70>s,
|
||||||
|
passez true au troisi<73>me param<61>tre optionnel. Ceci est l'<27>quivalent de la
|
||||||
|
fonction PHP <ulink url="&url.php-manual;wordwrap">wordwrap()</ulink>.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -45,30 +55,19 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
Ajuste une cha<68>ne de caract<63>res <20> une taille de colonne, par d<>faut 80.
|
|
||||||
Un second param<61>tre optionnel vous permet de sp<73>cifier la cha<68>ne <20> utiliser
|
|
||||||
pour l'ajustement <20> la nouvelle ligne (retour chariot \n par d<>faut).
|
|
||||||
Par d<>faut, wordwrap tente un ajustement <20> la fin d'un mot. Si vous voulez
|
|
||||||
autoriser le d<>coupage des mots pour un ajustement au caract<63>re pr<70>s,
|
|
||||||
passez true au troisi<73>me param<61>tre optionnel. Ceci est l'<27>quivalent de la
|
|
||||||
fonction PHP <ulink
|
|
||||||
url="&url.php-manual;wordwrap">wordwrap()</ulink>.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>wordwrap</title>
|
<title>wordwrap</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty->assign('articleTitle',
|
||||||
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau rein
|
"Blind woman gets new kidney from dad she hasn't seen in years."
|
||||||
d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.");
|
);
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
o<EFBFBD> index.tpl est :
|
O<EFBFBD> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -114,7 +113,8 @@ n'a pas vu depuis des ann
|
|||||||
</example>
|
</example>
|
||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="language.modifier.nl2br">nl2br</link>.
|
<link linkend="language.modifier.nl2br">nl2br</link> et
|
||||||
|
<link linkend="language.function.textformat">{textformat}</link>.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user