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

Source for file setting_a_locale.php

Documentation is available at setting_a_locale.php

  1. <?php
  2.  
  3. /**
  4. * Setting a locale
  5. * ================
  6. *
  7. * Because Un*x and Windows use different locale codes, PHPs setLocale() is not
  8. * easily portable - I18Nv2::setLocale() attempts to provide this portability.
  9. * With I18Nv2 you can use standard locale codes like 'en_US' on both, Linux
  10. * and Windows, though the list is far not complete yet, so if you stumble
  11. * over a not covered locale (I18Nv2::$locales in I18Nv2::_main()), just drop
  12. * a mail to <mike(@)php.net> with the missing locale and its corresponding
  13. * Win32 code.
  14. * $Id: setting_a_locale.php,v 1.1 2004/05/03 15:02:17 mike Exp $
  15. */
  16.  
  17. require_once 'I18Nv2.php';
  18.  
  19. $locale 'en_US';
  20.  
  21. if (!I18Nv2::setLocale($locale)) {
  22.     die("Locale '$locale' not available!\n");
  23. }
  24.  
  25. ?>

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