mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
added <![CDATA[ tags, sync translation informations, added missing para and infotables
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<chapter id="language.basic.syntax">
|
||||
<title>Bases syntaxiques</title>
|
||||
<para>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.date.format">
|
||||
<title>date_format</title>
|
||||
<informaltable frame="all">
|
||||
@@ -48,123 +48,176 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>date_format</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('hier', strtotime('-1 day'));
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
|
||||
$smarty->assign('hier', strtotime('-1 day'));
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
ou index.tpl est:
|
||||
</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"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne <20> l'<27>cran:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Feb 6, 2001
|
||||
Tuesday, February 6, 2001
|
||||
14:33:00
|
||||
Feb 5, 2001
|
||||
Monday, February 5, 2001
|
||||
14:33:00</programlisting>
|
||||
14:33:00
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>date_format indicateurs de convertion</title>
|
||||
<programlisting>
|
||||
<para>
|
||||
date_format conversion specifiers:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
%a - Abr<62>viation du jour de la semaine, selon les param<61>tres locaux.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%A - Nom du jour de la semaine, selon les param<61>tres locaux.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%b - Abr<62>viation du nom du jour, selon les param<61>tres locaux.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%B - Nom complet du mois, selon les param<61>tres locaux.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%c - Pr<50>f<EFBFBD>rences d'affichage selon les param<61>tres locaux.
|
||||
|
||||
</para></listitem>
|
||||
<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)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%d - Jour du mois, en tant que nombre d<>cimal (de 00 <20> 31)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%D - m<>me chose que %m/%d/%y
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%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)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%g - Position de la semaine dans le si<73>cle [00,99]
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%G - Position de la semaine, incluant le si<73>cle [0000,9999]
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%h - identique <20> %b
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%H - L'heure en tant que d<>cimale, en utilisant une horloge sur 24 (de 00 <20> 23)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%I - L'heure en tant que d<>cimale en utilisant une horloge sur 12 (de 01 to 12)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%j - jour de l'ann<6E>e (de 001 <20> 366)
|
||||
|
||||
</para></listitem>
|
||||
<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)
|
||||
|
||||
</para></listitem>
|
||||
<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)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%m - Mois en tant que nombre d<>cimal (de 01 <20> 12)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%M - Minute en tant que nombre d<>cimal
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%n - Retour chariot (nouvelle ligne).
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%p - soit am soit pm selon l'heure donn<6E>e, ou alors leurs correspondances locales.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%r - heure en notation a.m. et p.m.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%R - Heure au format 24 heures
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%S - Secondes en tant que nombre d<>cimal.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%t - Caract<63>re tabulation.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%T - Heure courante, <20>quivalent <20> %H:%M:%S
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%u - Jour de la semaine en tant que nombre d<>cimal [1,7], ou 1 repr<70>sente le lundi.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%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.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%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 4 jours dans l'ann<6E>e courante et ou Lundi est le premier jour
|
||||
de cette semaine.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%w - Jour de la semaine en tant que nombre d<>cimal, dimanche <20>tant 0
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%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.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%x - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de la date selon les param<61>tres locaux.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%X - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de l'heure selon les param<61>tres locaux, sans la
|
||||
date.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%y - L'ann<6E>e en tant que nombre d<>cimal, sans le si<73>cle. (de 00 <20> 99)
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%Y - L'ann<6E>e en tant que nombre d<>cimal, avec le si<73>cle.
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%Z - Zone horraire, nom ou abr<62>viation
|
||||
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
%% - Un caract<63>re lit<69>ral `%'
|
||||
|
||||
NOTE AUX DEVELOPPEURS: date_format est un alias de la fonction
|
||||
PHP strftime(). 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> (strftime ()).
|
||||
Reportez vous <20> l'aide de votre syst<73>me pour une liste compl<70>te des
|
||||
param<EFBFBD>tres disponibles.</programlisting>
|
||||
</example>
|
||||
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
<note>
|
||||
<title>Note aux d<>veloppeurs</title>
|
||||
<para>
|
||||
NOTE AUX DEVELOPPEURS: date_format est un alias de la fonction
|
||||
PHP strftime(). 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> (strftime ()).
|
||||
Reportez vous <20> l'aide de votre syst<73>me pour une liste compl<70>te des
|
||||
param<61>tres disponibles.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.default">
|
||||
<title>default</title>
|
||||
<informaltable frame="all">
|
||||
@@ -38,22 +38,31 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>default</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$TitreArticle|default:"pas de titre"}
|
||||
{$monTitre|default:"pas de titre"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne <20> l'<27>cran :
|
||||
</para>
|
||||
<screen>
|
||||
Les portes de la moria restent ferm<72>es.
|
||||
pas de titre</programlisting>
|
||||
pas de titre
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.escape">
|
||||
<title>escape</title>
|
||||
<informaltable frame="all">
|
||||
@@ -42,32 +42,43 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>escape</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('TitreArticle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|escape}
|
||||
{$titreArticle|escape:"html"} {* escapes & " ' < > *}
|
||||
{$titreArticle|escape:"htmlall"} {* escapes ALL html entities *}
|
||||
{$titreArticle|escape:"url"}
|
||||
{$titreArticle|escape:"quotes"}
|
||||
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
|
||||
|
||||
SORTIE:
|
||||
|
||||
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne <20> l'<27>cran:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
'Stiff Opposition Expected to Casketless Funeral Plan'
|
||||
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
||||
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
||||
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
||||
%27Stiff+Opposition+Expected+to+Casketless+Funeral+Plan%27
|
||||
\'Stiff Opposition Expected to Casketless Funeral Plan\'
|
||||
<a href="mailto:%62%6f%62%40%6d%65%2e%6e%65%74">&#x62;&#x6f;&#x62;&#x40;&#x6d;&#x65;&#x2e;&#x6e;&#x65;&#x74;</a></programlisting>
|
||||
<a href="mailto:%62%6f%62%40%6d%65%2e%6e%65%74">bob@me.net</a>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.indent">
|
||||
<title>indent</title>
|
||||
<informaltable frame="all">
|
||||
@@ -46,15 +46,20 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>indent</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'Il fera noir cette nuit.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('TitreArticle', 'Il fera noir cette nuit.');
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$TitreArticle}
|
||||
|
||||
{$TitreArticle|indent}
|
||||
@@ -62,9 +67,13 @@ index.tpl:
|
||||
{$TitreArticle|indent:10}
|
||||
|
||||
{$TitreArticle|indent:1:"\t"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne <20> l'<27>cran
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Il fera noir cette nuit.
|
||||
|
||||
Il fera noir cette nuit.
|
||||
@@ -72,7 +81,8 @@ Il fera noir cette nuit.
|
||||
Il fera noir cette nuit.
|
||||
|
||||
Il fera noir cette nuit.
|
||||
</programlisting>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.lower">
|
||||
<title>lower</title>
|
||||
<para>
|
||||
@@ -8,22 +8,33 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>lower</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$TitreArticle}
|
||||
{$TitreArticle|lower}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne <20> l'<27>cran :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Deux Suspects Se Sont Sauv<75>s.
|
||||
deux suspects se sont sauv<75>s.</programlisting>
|
||||
deux suspects se sont sauv<75>s.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.nl2br">
|
||||
<title>nl2br</title>
|
||||
<para>
|
||||
@@ -9,20 +9,31 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>nl2br</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', "Pluie ou soleil attendu\naujourd'hui, nuit noire");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('TitreArticle', "Pluie ou soleil attendu\naujourd'hui, nuit noire");
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$TitreArticle|nl2br}
|
||||
|
||||
SORTIE:
|
||||
|
||||
Pluie ou soleil attendu<br />aujourd'hui, nuit noire</programlisting>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Pluie ou soleil attendu<br />aujourd'hui, nuit noire
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.regex.replace">
|
||||
<title>regex_replace</title>
|
||||
<informaltable frame="all">
|
||||
@@ -43,25 +43,36 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>regex_replace</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<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');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('TitreArticle', "L'infertilit<69> est un maux grandissant\n, disent les experts.");
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* Remplace tous les retours chariot et les tabulation par une nouvelle ligne avec un espace *}
|
||||
|
||||
{$TitreArticle}
|
||||
{$TitreArticle|regex_replace:"/[\r\t\n]/":" "}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
L'infertilit<69> est un maux grandissant
|
||||
, disent les experts.
|
||||
L'infertilit<69> est un maux grandissant, disent les experts.</programlisting>
|
||||
L'infertilit<69> est un maux grandissant, disent les experts.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.replace">
|
||||
<title>replace</title>
|
||||
<informaltable frame="all">
|
||||
@@ -42,24 +42,35 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>replace</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|replace:"Garden":"Vineyard"}
|
||||
{$titreArticle|replace:" ":" "}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Child's Stool Great for Use in Garden.
|
||||
Child's Stool Great for Use in Vineyard.
|
||||
Child's Stool Great for Use in Garden.</programlisting>
|
||||
Child's Stool Great for Use in Garden.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.spacify">
|
||||
<title>spacify</title>
|
||||
<informaltable frame="all">
|
||||
@@ -37,25 +37,36 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>spacify</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?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');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|spacify}
|
||||
{$titreArticle|spacify:"^^"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne <20> l'<27>cran :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Quelquechose s'est mal pass<73> et <20> provoqu<71> cet accident, disent les experts.
|
||||
Q u e l q u e c h o s e s ' e s t m a l p a s s <20> e t <20> p r o v o q u <20> c e t a c c i d e n t , d i s e n t l e s e x p e r t s .
|
||||
Q^^u^^e^^l^^q^^u^^e^^c^^h^^o^^s^^e^^ ^^s^^'^^e^^s^^t^^ ^^m^^a^^l^^ ^^p^^a^^s^^s^^<5E>^^ ^^e^^t^^ ^^<5E>^^ ^^p^^r^^o^^v^^o^^q^^u^^<5E>^^ ^^c^^e^^t^^ ^^a^^c^^c^^i^^d^^e^^n^^t^^,^^ ^^d^^i^^s^^e^^n^^t^^ ^^l^^e^^s^^ ^^e^^x^^p^^e^^r^^t^^s^^.</programlisting>
|
||||
Q^^u^^e^^l^^q^^u^^e^^c^^h^^o^^s^^e^^ ^^s^^'^^e^^s^^t^^ ^^m^^a^^l^^ ^^p^^a^^s^^s^^<5E>^^ ^^e^^t^^ ^^<5E>^^ ^^p^^r^^o^^v^^o^^q^^u^^<5E>^^ ^^c^^e^^t^^ ^^a^^c^^c^^i^^d^^e^^n^^t^^,^^ ^^d^^i^^s^^e^^n^^t^^ ^^l^^e^^s^^ ^^e^^x^^p^^e^^r^^t^^s^^.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.string.format">
|
||||
<title>string_format</title>
|
||||
<informaltable frame="all">
|
||||
@@ -36,24 +36,35 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>string_format</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('nombre', 23.5787446);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('nombre', 23.5787446);
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$nombre}
|
||||
{$nombre|string_format:"%.2f"}
|
||||
{$nombre|string_format:"%d"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
23.5787446
|
||||
23.58
|
||||
24</programlisting>
|
||||
24
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,33 +1,70 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.strip.tags">
|
||||
<title>strip_tags</title>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols="5">
|
||||
<colspec colname="param" align="center" />
|
||||
<colspec colname="type" align="center" />
|
||||
<colspec colname="required" align="center" />
|
||||
<colspec colname="default" align="center" />
|
||||
<colspec colname="desc"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Position du param<61>tre</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Requis</entry>
|
||||
<entry>Defaut</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>1</entry>
|
||||
<entry>bool</entry>
|
||||
<entry>Non</entry>
|
||||
<entry>true</entry>
|
||||
<entry>Si l'on remplace les <20>l<EFBFBD>ments par ' ' ou par ''</entry>
|
||||
</row>
|
||||
</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>
|
||||
index.php:
|
||||
|
||||
<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');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$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');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|strip_tags}
|
||||
|
||||
SORTIE:
|
||||
|
||||
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.</programlisting>
|
||||
{$titreArticle|strip_tags} {* identique <20> {$titreArticle|strip_tags:true} *}
|
||||
{$titreArticle|strip_tags:false}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
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.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.strip">
|
||||
<title>strip</title>
|
||||
<para>
|
||||
@@ -17,27 +17,36 @@
|
||||
</note>
|
||||
<example>
|
||||
<title>strip</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', "Une r<>union autour\n d'un feu de chemin<69>e\t
|
||||
$smarty->assign('titreArticle', "Une r<>union autour\n d'un feu de chemin<69>e\t
|
||||
est toujours agr<67>able.");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|strip}
|
||||
{$titreArticle|strip:"&nbsp;"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
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.</programlisting>
|
||||
&nbsp;agr<67>able.
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.truncate">
|
||||
<title>truncate</title>
|
||||
<informaltable frame="all">
|
||||
@@ -59,15 +59,20 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>truncate</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<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');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$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 :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|truncate}
|
||||
{$titreArticle|truncate:30}
|
||||
@@ -75,16 +80,21 @@ index.tpl:
|
||||
{$titreArticle|truncate:30:"---"}
|
||||
{$titreArticle|truncate:30:"":true}
|
||||
{$titreArticle|truncate:30:"...":true}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.
|
||||
Deux soeurs r<>unies apr<70>s...
|
||||
Deux soeurs r<>unies apr<70>s
|
||||
Deux soeurs r<>unies apr<70>s---
|
||||
Deux soeurs r<>unies apr<70>s 18 a
|
||||
Deux soeurs r<>unies apr<70>s 1...
|
||||
</programlisting>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.upper">
|
||||
<title>upper</title>
|
||||
<para>
|
||||
@@ -8,23 +8,32 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>upper</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?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, cela risque de durer longtemps.");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ou index.tpl est:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|upper}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
Si l'attaque n'est pas mise en place rapidement, cela risque de durer longtemps.
|
||||
SI L'ATTAQUE N'EST PAS MISE EN PLACE RAPIDEMENT, CELA RISQUE DE DURER LONGTEMPS.</programlisting>
|
||||
SI L'ATTAQUE N'EST PAS MISE EN PLACE RAPIDEMENT, CELA RISQUE DE DURER LONGTEMPS.
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.modifier.wordwrap">
|
||||
<title>wordwrap</title>
|
||||
<informaltable frame="all">
|
||||
@@ -55,28 +55,37 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>wordwrap</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau rein
|
||||
$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');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
ou index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
|
||||
{$titreArticle|wordwrap:30}
|
||||
|
||||
{$titreArticle|wordwrap:20}
|
||||
|
||||
{$titreArticle|wordwrap:30:"<br>\n"}
|
||||
{$titreArticle|wordwrap:30:"<br>\n"}
|
||||
|
||||
{$titreArticle|wordwrap:30:"\n":true}
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
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
|
||||
@@ -90,15 +99,16 @@ rein d'un p
|
||||
qu'elle n'a pas vu
|
||||
depuis des ann<6E>es.
|
||||
|
||||
Une femme aveugle obtient un<br>
|
||||
nouveau rein d'un p<>re<br>
|
||||
qu'elle n'a pas vu depuis<br>
|
||||
Une femme aveugle obtient un<br>;
|
||||
nouveau rein d'un p<>re<br>;
|
||||
qu'elle n'a pas vu depuis<br>;
|
||||
des ann<6E>es.
|
||||
|
||||
Une femme aveugle obtient un n
|
||||
ouveau rein d'un p<>re qu'elle
|
||||
n'a pas vu depuis des ann<6E>es.
|
||||
</programlisting>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
Reference in New Issue
Block a user