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

Source for file using_I18Nv2_Locale.php

Documentation is available at using_I18Nv2_Locale.php

  1. <?php
  2.  
  3. /**
  4. * Using I18Nv2_Locale
  5. * ===================
  6. *
  7. * I18Nv2_Locale is a formatter object that provides functionality to format
  8. * dates, times, numbers and currencies in locale dependent conventions.
  9. * $Id: using_I18Nv2_Locale.php,v 1.2 2005/01/05 09:26:18 mike Exp $
  10. */
  11.  
  12. require_once 'I18Nv2.php';
  13.  
  14. $locale &I18Nv2::createLocale('de_AT');
  15.  
  16. echo "de_AT\n=====\n";
  17. echo "Format a currency value of 2000: ",
  18.     $locale->formatCurrency(2000I18Nv2_CURRENCY_INTERNATIONAL)"\n";
  19.  
  20. echo "Format todays date:              ",
  21.     $locale->formatDate(nullI18Nv2_DATETIME_FULL)"\n";
  22.  
  23. echo "Format current time:             ",
  24.     $locale->formatTime(nullI18Nv2_DATETIME_SHORT)"\n";
  25.  
  26.  
  27. $locale->setLocale('en_GB');
  28.  
  29. echo "\nen_GB\n=====\n";
  30. echo "Format a currency value of 2000: ",
  31.     $locale->formatCurrency(2000I18Nv2_CURRENCY_INTERNATIONAL)"\n";
  32.  
  33. echo "Format todays date:              ",
  34.     $locale->formatDate(nullI18Nv2_DATETIME_FULL)"\n";
  35.  
  36. echo "Format current time:             ",
  37.     $locale->formatTime(nullI18Nv2_DATETIME_SHORT)"\n";
  38.  
  39. ?>

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