cvs: phpdoc-fr /reference/strings/functions number-format.xml
| From: | Damien Seguy | Date: | Mon, 14 Oct 2002 22:53:36 +0000 |
| Subject: | cvs: phpdoc-fr /reference/strings/functions number-format.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-85@lists.php.net to get a copy of this message | ||
dams Mon Oct 14 18:53:36 2002 EDT
Added files:
/phpdoc-fr/reference/strings/functions number-format.xml
Log:
update translation
Index: phpdoc-fr/reference/strings/functions/number-format.xml
+++ phpdoc-fr/reference/strings/functions/number-format.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./fr/functions/math.xml, last change in rev 1.11 -->
<!-- last change to 'number-format' in en/ tree in rev 1.2 -->
<refentry id="function.number-format">
<refnamediv>
<refname>number_format</refname>
<refpurpose>Formate un nombre pour l'affichage.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>number_format</methodname>
<methodparam><type>float</type><parameter>number</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>decimals</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>dec_point</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>thousands_sep</parameter></methodparam>
</methodsynopsis>
<para>
<function>number_format</function> retourne une chaîne
représentant <parameter>number</parameter> formaté.
<function>number_format</function> accepte un, deux ou 4 paramètres
(mais pas trois).
</para>
<para>
Si le seul paramètre <parameter>number</parameter> est donné,
il sera formaté sans partie décimale, mais avec une
virgule entre chaque millier.
</para>
<para>
Si les deux paramètres <parameter>number</parameter> et
<parameter>decimals</parameter> sont fournis,
<parameter>number</parameter> sera
formaté avec <parameter>decimals</parameter> décimales,
un point (".") comme séparateur décimal et une virgule entre
chaque
millier.
</para>
<para>
Avec quatre paramètres, <parameter>number</parameter> sera
formaté avec <parameter>decimals</parameter> décimales,
<parameter>dec_point</parameter> comme séparateur décimal, et
<parameter>thousands_sep</parameter> comme séparateur de milliers.
</para>
<note>
<para>
Seul le premier caractère du paramètre
<parameter>thousands_sep</parameter>
est utilisé. Par exemple, si vous utilisez <literal>foo</literal> comme
séparateur de milliers, sur le nombre <literal>1000</literal>,
<function>number_format</function> retournera <literal>1f000</literal>.
</para>
</note>
<para>
En notation française, on utilise généralement deux chiffres
après la virgule, une virgule comme séparateur décimal, et un
espace comme séparateur de milliers. Cela donne :
<example>
<title>Exemple avec <function>number_format</function></title>
<programlisting role="php">
<![CDATA[
<?php
$nombre = 1234.56;
// Notation anglaise (par défaut)
$english_format_number = number_format($nombre);
// 1,234.56
// Notation française
$nombre_format_francais = number_format($nombre, 2, ',', ' ');
// 1 234,56
?>
]]>
</programlisting>
</example>
</para>
<para>
Voir aussi
<function>sprintf</function>,
<function>printf</function> et
<function>sscanf</function>.
</para>
</refsect1>
</refentry>
<!-- 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
-->