/**
* Sets the locale to use
*
* @param string|Zend_Locale $locale
* @throws Zend_Validate_Exception On unrecognised region
* @throws Zend_Validate_Exception On not detected format
* @return Zend_Validate_PostCode Provides fluid interface
*/
public function setLocale($locale = null
) { $this->_locale = Zend_Locale::
findLocale($locale);
$locale =
new Zend_Locale($this->_locale
);
$region =
$locale->
getRegion();
if (empty($region)) { throw new Zend_Validate_Exception("Unable to detect a region for the locale '
$locale'"
);
} $format = Zend_Locale::
getTranslation( $locale->
getRegion(),
'postaltoterritory',
$this->_locale
);