public function setLocale($locale = null)
    {
        if (is_string($locale)) {
            $locale = array($locale);
        } elseif ($locale instanceof Zend_Locale) {
            $locale = array($locale->toString());
        } elseif (!is_array($locale)) {

            throw new Zend_Filter_Exception('Locale has to be string, array or an instance of Zend_Locale');
        }

        foreach ($locale as $single) {
            if (!Zend_Locale::isLocale($single)) {

                throw new Zend_Filter_Exception("Unknown locale '$single'");
            }
        }

        $this->_locale = $locale;
        return $this;
    }
public function setLocale($locale = null)
    {
        if (is_string($locale)) {
            $locale = array($locale);
        } elseif ($locale instanceof Zend_Locale) {
            $locale = array($locale->toString());
        } elseif (!is_array($locale)) {

            throw new Zend_Filter_Exception('Locale has to be string, array or an instance of Zend_Locale');
        }

        foreach ($locale as $single) {
            if (!Zend_Locale::isLocale($single)) {

                throw new Zend_Filter_Exception("Unknown locale '$single'");
            }
        }

        $this->_locale = $locale;
        return $this;
    }
public function setLocale ( $ locale = null ) { if ( is_string ( $ locale ) ) { $ locale = array ( $ locale ) ; } elseif ( $ locale instanceof Zend_Locale ) { $ locale = array ( $ locale -> toString ( ) ) ; } elseif ( ! is_array ( $ locale ) ) { throw new Zend_Filter_Exception ( 'Locale has to be string, array or an instance of Zend_Locale' ) ; } foreach ( $ locale as $ single ) { if ( ! Zend_Locale :: isLocale ( $ single ) ) { throw new Zend_Filter_Exception ( "Unknown locale '$single'" ) ; } } $ this -> _locale = $ locale ; return $ this ; }
Set the locales which are accepted

@param  string|array|Zend_Locale $locale
@throws Zend_Filter_Exception
@return Zend_Filter_Boolean
Set the locales which are accepted