Hi All,

Hoping someone can help me out here.

I have just upgraded to ZF 1.5 and have discovered that Zend_Translate can
be made available to views by setting a registry entry and then using
$this->translate('langString') in my views.

I have created some helpers that I include in my views using e.g.

echo $this->myHelper();

In my Helper I have the following:

class Zend_View_Helper_MyHelper
{
  public function myHelper()
  {
    $s = "Hello World!";
    $s .= $this->translate('myString');

    return $;
  }
}

When this is run I will get an error in my view stating: Call to undefined
method Zend_View_Helper_MyHelper::translate() ...

Now, I can seem to fix this by changing the class line above to read:

class Zend_View_Helper_MyHelper extends Zend_View

My question is, is this correct or should I be going about things a
completely different way?

Many thanks in advance.

- Robert
-- 
View this message in context: 
http://www.nabble.com/Zend_Translate-and-Zend_View_Helper_*-question--tp16143971s16154p16143971.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to