cvs: smarty /docs/fr/designers/language-basic-syntax language-escaping.xml language-math.xml

"Mehdi Achour" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsdidou1081872918@cvsserver>
didou		Tue Apr 13 12:15:18 2004 EDT

  Added files:                 
    /smarty/docs/fr/designers/language-basic-syntax	
                                                   	language-escaping.xml 
                                                   	language-math.xml 
  Log:
  two new files translated
  

http://cvs.php.net/co.php/smarty/docs/fr/designers/language-basic-syntax/language-escaping.xml?r=1.1&p=1
Index: smarty/docs/fr/designers/language-basic-syntax/language-escaping.xml
+++ smarty/docs/fr/designers/language-basic-syntax/language-escaping.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
   <sect1 id="language.escaping">
    <title>Désactiver l'analyse de Smarty</title>
    <para>
     Il est quelquesfois bien ou même nécessaire de faire ignorer certaines sections
     à Smarty qu'il analyserait sinon. Un exemple classique est l'incorporation de code
     Javascript ou CSS dans les templates. Le problème est que ces langages utilisent 
     les caractères { et } qui sont aussi les délimiteurs par défaut de Smarty.
    </para>

    <para>
     Le plus simple est d'éviter une telle situation en séparant votre code Javascript et CSS
     dans des fichiers séparés et d'utiliser les méthodes standard HTML pour y accéder.
    </para>

    <para>
     Inclure du contenu litéral est possible en utilisant les blocks <link 
     linkend="language.function.literal">{literal} .. {/literal}</link>.
     Similairement à l'utilisation d'entités HTML, vous pouvez utiliser <link 
     linkend="language.function.ldelim">{ldelim}</link> et <link 
     linkend="language.function.ldelim">{rdelim}</link> pour afficher les délimiteurs.
    </para>

    <para>
     Il est souvent plus simple de modifier les délimiteurs de Smarty : <link 
     linkend="variable.left.delimiter">$left_delimiter</link> et
     <link linkend="variable.right.delimiter">$right_delimiter</link>.
    </para>
    <example>
     <title>Exemple de changement de délimiteur</title>
     <programlisting role="php">
<![CDATA[
<?php

$smarty = new Smarty;
$smarty->left_delimiter = '<!--{';
$smarty->right_delimiter = '}-->';
$smarty->assign('foo', 'bar');
$smarty->display('example.tpl');

?>

--- example.tpl
<script language="javascript">
var foo = <!--{$foo}-->;
function dosomething() {
    alert("foo is " + foo);
}
dosomething();
</script>
]]>
     </programlisting>
    </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

http://cvs.php.net/co.php/smarty/docs/fr/designers/language-basic-syntax/language-math.xml?r=1.1&p=1
Index: smarty/docs/fr/designers/language-basic-syntax/language-math.xml
+++ smarty/docs/fr/designers/language-basic-syntax/language-math.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
   <sect1 id="language.math">
    <title>Mathématiques</title>
    <para>
     Les maéthématiques peuvent être directement appliquées aux
     valeurs de variables.
    </para>
    <example>
     <title>Exemples de mathématiques</title>
     <programlisting>
<![CDATA[
{$foo+1}

{$foo*$bar}

{* quelques exemples plus compliqués *}

{$foo->bar-$bar[1]*$baz->foo->bar()-3*7}

{if ($foo+$bar.test%$baz*134232+10+$b+10)}

{$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"}

{assign var="foo" value="`$foo+$bar`"}
]]>
     </programlisting>
    </example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.