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. * 
  10. * With I18Nv2 you can use standard locale codes like 'en_US' on both, Linux
  11. * and Windows, though the list is far not complete yet, so if you stumble
  12. * over a not covered locale (I18Nv2::$locales in I18Nv2::_main()), just drop
  13. * a mail to <mike(@)php.net> with the missing locale and its corresponding
  14. * Win32 code.
  15. * 
  16. * $Id: setting_a_locale.php,v 1.1 2004/05/03 15:02:17 mike Exp $
  17. */
  18.  
  19. require_once 'I18Nv2.php';
  20.  
  21. $locale = 'en_US';
  22.  
  23. if (!I18Nv2::setLocale($locale)) {
  24.     die("Locale '$locale' not available!\n");
  25. }
  26.  
  27. ?>

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