Class SGL_Locale

Description

Wraps PEAR locale package.

Located in /SGL/Locale.php (line 49)


	
			
Method Summary
 void setTimeZone ( $tzone)
 I18Nv2 &singleton ([ $newLocale = false], string $locale)
Methods
setTimeZone (line 103)
void setTimeZone ( $tzone)
  • $tzone
singleton (line 65)

Negotiates the locale from HTTP if necessary. Gets it from _SESSION and database otherwise.

usage:

$locale =& SGL_Locale::singleton(); // setting locale here would override defaults.

echo $locale->formatCurrency(2000,I18Nv2_CURRENCY_LOCAL); echo $locale->formatDate(time());

  • return: Returns a single instance of I18Nv2
I18Nv2 &singleton ([ $newLocale = false], string $locale)
  • string $locale: Overrides getting the locale from session/usr
  • $newLocale

Documentation generated on Tue, 23 Feb 2010 18:14:31 +0000 by phpDocumentor 1.4.3