An issue about Zend_Translate_Adapter

My codes is:

public function testGetTextTw()


    $t = new Zend_Translate(‘gettext’, ‘./_locale/’, ‘zh_TW’);

    $this->assertEquals(‘n2’, $t->_(‘New’));


public function testGetTextCn()


    $t = new Zend_Translate(‘gettext’, ‘./_locale/’, ‘zh_CN’);

    $this->assertEquals(‘n1’, $t->_(‘New’));


But, the testGetTextCn() go into fail: expected string ‘n1’ but got string ‘n2’.

So, I read the codes in Zend_Translate_Adapter::__construct().
the param variable $local was covered by an other value.

I made this patch:

zend_translate_adapter patch

Now, it works fine!

The issue and the patch have been submited to issue tracker: