mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
sync with EN
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.capitalize">
|
||||
<title>capitalize</title>
|
||||
<para>
|
||||
Met la premi<6D>re lettre de chaque mot d'une variable en majuscule.
|
||||
</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -31,18 +35,13 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Met la premi<6D>re lettre de chaque mot d'une variable en majuscule.
|
||||
</para>
|
||||
<example>
|
||||
<title>Mise en majuscule</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', 'Le nouveau php5 est vraiment performant !');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
@@ -71,9 +70,10 @@ Le Nouveau Php5 Est Vraiment Performant !
|
||||
<para>
|
||||
Voir aussi
|
||||
<link linkend="language.modifier.lower">lower</link> et
|
||||
<link linkend="language.modifier.upper">upper</link>
|
||||
<link linkend="language.modifier.upper">upper</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.cat">
|
||||
<title>cat</title>
|
||||
<para>
|
||||
Cette valeur est concat<61>n<EFBFBD>e <20> la variable donn<6E>e.
|
||||
</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -30,22 +34,19 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Cette valeur est concat<61>n<EFBFBD>e <20> la variable donn<6E>e.
|
||||
</para>
|
||||
<example>
|
||||
<title>cat</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('articleTitle', "'Les devins ont pr<70>vus que le monde existera toujours");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est:
|
||||
Ou le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -62,6 +63,7 @@ Les devins ont pr
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.count.characters">
|
||||
<title>count_characters</title>
|
||||
<para>
|
||||
Compte le nombre de caract<63>res dans une variable.
|
||||
</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -30,24 +34,19 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Compte le nombre de caract<63>res dans une variable.
|
||||
</para>
|
||||
<example>
|
||||
<title>count_characters</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', 'Vagues de froid li<6C>es <20> la temp<6D>rature.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est:
|
||||
O<> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -69,9 +68,9 @@ Vagues de froid li
|
||||
</example>
|
||||
<para>
|
||||
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.words">count_words</link>.
|
||||
<link linkend="language.modifier.count.paragraphs">count_paragraphs</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.count.paragraphs">
|
||||
<title>count_paragraphs</title>
|
||||
<para>
|
||||
@@ -11,14 +12,16 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'La guerre apporte la paix, au prix de la vie de certains innocents.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
$smarty->assign('articleTitle',
|
||||
"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>
|
||||
<para>
|
||||
O<> index.tpl est:
|
||||
O<> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![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>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.count.sentences">
|
||||
<title>count_sentences</title>
|
||||
<para>
|
||||
@@ -11,16 +12,17 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'Deux navires rentrent en
|
||||
collision - Un des deux coule. Des vaches enrag<61>es blessent un fermier <20>
|
||||
coups de haches.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
$smarty->assign('articleTitle',
|
||||
'Two Soviet Ships Collide - One Dies.
|
||||
Enraged Cow Injures Farmer with Axe.'
|
||||
);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
O<> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.count.words">
|
||||
<title>count_words</title>
|
||||
<para>
|
||||
@@ -12,15 +13,13 @@
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'Un anneau pour les gouverner tous.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est:
|
||||
O<> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
@@ -1,8 +1,21 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.date.format">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -37,16 +50,26 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
<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 timestamp 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> date_format est vide, et qu'un second param<61>tre
|
||||
est donn<6E>, ce dernier sera utilis<69> comme <20>tant la date <20> formater.
|
||||
<note>
|
||||
<para>
|
||||
Depuis Smarty 2.6.10, les valeurs num<75>riques pass<73>es <20> date_format
|
||||
sont <emphasis>toujours</emphasis> (except<70> pour les timestamps mysql, voir
|
||||
ci-dessous) interpr<70>t<EFBFBD>es comme un timestamp Unix.
|
||||
</para>
|
||||
<para>
|
||||
Avant la version 2.6.10 de Smarty, les cha<68>nes num<75>riques qui <20>taient
|
||||
<20>galement analysables par strtotime() en PHP (comme "YYYYMMDD"),
|
||||
<20>taient, parfois, d<>pendament de l'impl<70>mentation de strtotime(),
|
||||
interpr<70>t<EFBFBD>es en tant que des cha<68>nes date et non des timestamps.
|
||||
</para>
|
||||
<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>
|
||||
@@ -54,23 +77,22 @@
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('hier', strtotime('-1 day'));
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est:
|
||||
O<> le template est (utilisation de <link linkend="language.variables.smarty.now">$smarty.now</link>) :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$smarty.now|date_format}
|
||||
{$smarty.now|date_format:"%A, %B %e, %Y"}
|
||||
{$smarty.now|date_format:"%H:%M:%S"}
|
||||
{$hier|date_format}
|
||||
{$hier|date_format:"%A, %B %e, %Y"}
|
||||
{$hier|date_format:"%H:%M:%S"}
|
||||
{$smarty.now|date_format:"%D"}
|
||||
{$smarty.now|date_format:"%I:%M %p"}
|
||||
{$yesterday|date_format}
|
||||
{$yesterday|date_format:"%A, %B %e, %Y"}
|
||||
{$yesterday|date_format:"%H:%M:%S"}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
@@ -79,8 +101,8 @@ $smarty->display('index.tpl');
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Feb 6, 2001
|
||||
Tuesday, February 6, 2001
|
||||
14:33:00
|
||||
02/06/01
|
||||
02:33 pm
|
||||
Feb 5, 2001
|
||||
Monday, February 5, 2001
|
||||
14:33:00
|
||||
@@ -88,7 +110,7 @@ Monday, February 5, 2001
|
||||
</screen>
|
||||
</example>
|
||||
<para>
|
||||
date_format conversion specifiers:
|
||||
Conversion de <command>date_format</command> :
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
%a - Abr<62>viation du jour de la semaine, selon les param<61>tres locaux.
|
||||
@@ -212,7 +234,7 @@ en tant que premier jour de la premi
|
||||
<note>
|
||||
<title>Note aux d<>veloppeurs</title>
|
||||
<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>.
|
||||
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>.
|
||||
@@ -224,6 +246,7 @@ en tant que premier jour de la premi
|
||||
<para>
|
||||
Voir aussi
|
||||
<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
|
||||
les <link linkend="tips.dates">astuces sur les dates</link>.
|
||||
</para>
|
||||
|
@@ -1,8 +1,14 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.default">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -31,24 +37,19 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>default</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<EFBFBD> index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -70,6 +71,7 @@ pas de titre
|
||||
et <link linkend="tips.blank.var.handling">la gestion de l'effacement des variables</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,8 +1,15 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.escape">
|
||||
<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">
|
||||
<tgroup cols="6">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -34,25 +41,21 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>escape</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
$smarty->assign('articleTitle',
|
||||
"'Stiff Opposition Expected to Casketless Funeral Plan'"
|
||||
);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<EFBFBD> index.tpl est:
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -82,8 +85,8 @@ Ce qui donne
|
||||
</example>
|
||||
<para>
|
||||
Voir aussi la
|
||||
<link linkend="language.escaping">d<EFBFBD>sactivation de l'analyse de Smarty</link>
|
||||
et le <link linkend="tips.obfuscating.email">mascage des adresses E-mail</link>.
|
||||
<link linkend="language.escaping">d<EFBFBD>sactivation de l'analyse de Smarty</link> et
|
||||
le <link linkend="tips.obfuscating.email">mascage des adresses E-mail</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
@@ -1,8 +1,16 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.indent">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -37,26 +45,22 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>indent</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'Il fera noir cette nuit.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
$smarty->assign('articleTitle',
|
||||
'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>
|
||||
<para>
|
||||
Ou index.tpl est:
|
||||
Ou le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -74,20 +78,28 @@ Ce qui donne
|
||||
</para>
|
||||
<screen>
|
||||
<![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>
|
||||
</example>
|
||||
<para>
|
||||
Voir aussi
|
||||
<link linkend="language.modifier.strip">strip</link>
|
||||
et <link linkend="language.modifier.spacify">spacify</link>.
|
||||
<link linkend="language.modifier.strip">strip</link> et
|
||||
<link linkend="language.modifier.spacify">spacify</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.lower">
|
||||
<title>lower</title>
|
||||
<para>
|
||||
@@ -11,14 +12,14 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
O<> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -42,6 +43,7 @@ deux suspects se sont sauv
|
||||
<link linkend="language.modifier.capitalize">Capitalize</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.nl2br">
|
||||
<title>nl2br</title>
|
||||
<para>
|
||||
@@ -12,14 +13,16 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', "Pluie ou soleil attendu\naujourd'hui, nuit noire");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
$smarty->assign('articleTitle',
|
||||
"Sun or rain expected\ntoday, dark tonight"
|
||||
);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<EFBFBD> index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
@@ -1,8 +1,14 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.regex.replace">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -37,24 +43,19 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>regex_replace</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('TitreArticle', "L'infertilit<69> est un maux grandissant\n, disent les experts.");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
Ou le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
@@ -1,8 +1,13 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.replace">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -37,29 +42,25 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>replace</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
Ou le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|replace:"Garden":"Vineyard"}
|
||||
{$titreArticle|replace:" ":" "}
|
||||
{$titreArticle|replace:'Garden':'Vineyard'}
|
||||
{$titreArticle|replace:' ':' '}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
@@ -79,6 +80,7 @@ Child's Stool Great for Use in Garden.
|
||||
<link linkend="language.modifier.escape">escape</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,8 +1,14 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.spacify">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -30,25 +36,20 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>spacify</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('titreArticle', 'Quelque chose s\'est mal pass<73> et <20> provoqu<71>
|
||||
cet accident, disent les experts');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
@@ -1,8 +1,14 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.string.format">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -30,24 +36,19 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>string_format</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('nombre', 23.5787446);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
ou index.tpl est :
|
||||
o<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
@@ -1,8 +1,13 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.strip.tags">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -30,23 +35,22 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Supprime toutes les balises, et plus g<>n<EFBFBD>ralement tout ce qui se trouve
|
||||
entre < et >.
|
||||
</para>
|
||||
<example>
|
||||
<title>strip_tags</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?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->display('index.tpl');
|
||||
|
||||
$smarty->assign('articleTitle',
|
||||
"Blind Woman Gets <font face=\"helvetica\">New
|
||||
Kidney</font> from Dad she Hasn't Seen in <b>years</b>."
|
||||
);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -60,13 +64,14 @@ Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![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>.
|
||||
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es .
|
||||
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 <font face="helvetica">New Kidney</font> from Dad she Hasn't Seen in <b>years</b>.
|
||||
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years .
|
||||
Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.strip">
|
||||
<title>strip</title>
|
||||
<para>
|
||||
@@ -11,8 +12,7 @@
|
||||
<title>Note</title>
|
||||
<para>
|
||||
Si vous voulez r<>aliser cette action sur un bloc complet du template,
|
||||
utilisez la <link
|
||||
linkend="language.function.strip">fonction strip</link>.
|
||||
utilisez la fonction <link linkend="language.function.strip">{strip}</link>.
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
@@ -28,27 +28,30 @@ $smarty->display('index.tpl');
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|strip}
|
||||
{$titreArticle|strip:"&nbsp;"}
|
||||
{$titreArticle|strip:" "}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
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
|
||||
&nbsp;agr<67>able.
|
||||
Une r<>union autour d'un feu de chemin<69>e est toujours
|
||||
agr<67>able.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.truncate">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -33,8 +43,8 @@
|
||||
<entry>cha<EFBFBD>ne de caract<63>re</entry>
|
||||
<entry>Non</entry>
|
||||
<entry>...</entry>
|
||||
<entry>Le texte <EFBFBD> rajouter lorsque l'on effectue un
|
||||
troncage.</entry>
|
||||
<entry>Le texte qui remplace le texte tronqu<71>. Sa longueur n'est PAS
|
||||
incluse dans la configuration de la longueur <20> tronquer.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>3</entry>
|
||||
@@ -45,31 +55,31 @@
|
||||
le dernier mot (false), ou au caract<63>re exact (true).
|
||||
</entry>
|
||||
</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>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>truncate</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('titreArticle', 'Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -97,6 +107,7 @@ Deux soeurs r
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.upper">
|
||||
<title>upper</title>
|
||||
<para>
|
||||
@@ -11,15 +12,15 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->assign('titreArticle', "Si l'attaque n'est pas mise en place
|
||||
rapidement, cel<65> risque de durer longtemps.");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est:
|
||||
O<> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -41,6 +42,7 @@ SI L'ATTAQUE N'EST PAS MISE EN PLACE RAPIDEMENT, CEL
|
||||
<link linkend="language.modifier.capitalize">capitalize</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
@@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="language.modifier.wordwrap">
|
||||
<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">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
@@ -45,30 +55,19 @@
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</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>
|
||||
<title>wordwrap</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau rein
|
||||
d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.");
|
||||
$smarty->display('index.tpl');
|
||||
$smarty->assign('articleTitle',
|
||||
"Blind woman gets new kidney from dad she hasn't seen in years."
|
||||
);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
o<EFBFBD> index.tpl est :
|
||||
O<EFBFBD> le template est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
@@ -114,7 +113,8 @@ n'a pas vu depuis des ann
|
||||
</example>
|
||||
<para>
|
||||
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>
|
||||
</sect1>
|
||||
|
||||
|
Reference in New Issue
Block a user