ZF-7352: Resource_Translate should test registry


Line 78 in Zend/Application/Resource/Translate.php

If I want to use this resource with a module bootstrap

I must set a registry-key or it will overwrite any other translate object, which is registered there, even if I just want to use it straight from the module bootstrap.

$bootstrap = $this->getModuleBootstrap(); // A shortcut I wrote
$translate = $bootstrap->getPluginResource('translate')->getTranslate();

So it should test the registry before

if (!Zend_Registry::has ($key)) {
  Zend_Registry::set($key, $this->_translate);


If I understand correctly; you're trying to bootstrap the translation resource twice, but want the second time ignored?

Closing as won't fix because it doesn't make any sense to bootstrap the same Resource Plugin twice.

If you feel your issue was misunderstood please comment and reopen.

I wanted to use the translate-plugin within module bootstraps also, but depending on the order they are executed, one will overwrite the other. As you can see this report is from July, so I dont know exactly, what I wanted to do that time. Now I would say, that it may be useful, if a second call will just add other language files to the object from the registry, instead of overwriting the it. Just as a suggestion :) This will allow users to add additional module based language files.

Issue reopened. Will evaluate later.

Fixed. Thank you for reporting the issue!