I18N
[ class tree: I18N ] [ index: I18N ] [ all elements ]

Source for file I18N_Number.php

Documentation is available at I18N_Number.php

  1. <?php
  2.     //
  3.     //
  4.     //
  5.  
  6.     ini_set('include_path',ini_get('include_path').':../..');
  7.  
  8.     require_once 'I18N/Number.php';
  9.     
  10.     $locales = array('de_DE','en_US','fr_FR','it_IT');
  11.  
  12.     foreach$locales as $aLocale )
  13.     {
  14.         $number = new I18N_Number$aLocale );
  15.  
  16.         myPrint("<h1>\$number = new I18N_Number( '$aLocale' );</h1>");
  17.  
  18.         //
  19.         //
  20.         //
  21.         myPrint$number->formatpi() ) );
  22.         myPrint$number->format1000000 ) );
  23.  
  24.  
  25.         $number->setFormat(I18N_NUMBER_INTEGER);
  26.         myPrint$number->formatpi() ) );
  27.         myPrint$number->format100000.99 ) );
  28.  
  29.  
  30.         // set some sencesless format, which has
  31.         // 4 - digits behind the decimal seperator
  32.         // ; - as the decimal seperator
  33.         // : - as the thousands seperator
  34.         $myFormat $number->setFormat(array';' ':' ));
  35.         myPrint$number->formatpi() ) );
  36.         myPrint$number->format1000000.99 ) );
  37.  
  38.  
  39.         // using all currently available formats, including myFormat, which we defined above
  40.         myPrint$number->formatpi(I18N_NUMBER_INTEGER ) );
  41.         myPrint$number->formatpi(I18N_NUMBER_FLOAT ) );
  42.         myPrint$number->formatpi($myFormat ) );
  43.  
  44.     }
  45.  
  46.  
  47.  
  48.  
  49.     function myPrint$string )
  50.     {
  51.         print "$string<br>";
  52.     }
  53. ?>

Documentation generated on Mon, 11 Mar 2019 15:36:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.