public function format($value, $params = null, $locale = null) {
		if ($locale === null) {
			$locale = 'en';
		}
		
		$formatter = $this->getFormatter($locale);
		
		if (isset($params['primary'])) {
			return $formatter->formatCurrency($value, $params['primary']);
		}

		if (isset($params['currency'])) {
			return $formatter->formatCurrency($value, $params['currency']);
		}
		
		trigger_error('The "currency" parameter was not specified');
		
		return $formatter->format($value);
	}