ZF-3517: Zend_Translate_Adapter::getMessages() doesn't except the locale param as an instance of Zend_Locale

Issue Type: Bug Created: 2008-06-26T07:35:20.000+0000 Last Updated: 2008-09-02T10:39:23.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Marc Bennewitz (GIATA mbH) (mben) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: Attachments:


<pre class="highlight">
$translate->getMessages( new Zend_Locale('de') );
// -> Warning: Illegal offset type in /xxx/ on line 333

<pre class="highlight">
     * Returns all available translations from this adapter
     * If no locale is given, the actual language will be used
     * If 'all' is given the complete translation dictionary will be returned
     * @param  string|Zend_Locale $locale (optional) Language to return the messages from
     * @return array
    public function getMessages($locale = null)
        if ($locale == 'all') {
            return $this->_translate;
        if (empty($locale) or !$this->isAvailable($locale)) {
            $locale = $this->_options['locale'];
        return $this->_translate[$locale];


Posted by Thomas Weidner (thomas) on 2008-06-28T03:55:09.000+0000

Your problem is not that the locale is given as instance. The language you are requesting does not exist.

Posted by Thomas Weidner (thomas) on 2008-06-28T04:19:43.000+0000

Fixed with r9816

Posted by Thomas Weidner (thomas) on 2008-07-26T11:41:30.000+0000

Fixed within branch 1.5

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:23.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.