Simply read here:
http://framework.zend.com/manual/en/zend.translate.additional.html#zend.translate.additional.options

or search the manual:
http://framework.zend.com/manual/search?query=Options+Zend_Translate&language=en&search=Search+Manual%21

or search the web:
http://www.google.at/search?hl=de&source=hp&q=Zend_Translate+Options&meta=&aq=f&oq=

or read the forums.
This question has been raised and answered several times in past.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "Саша Стаменковић" <[email protected]>
To: "Thomas Weidner" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, November 18, 2009 12:29 PM
Subject: Re: [fw-general] Problem with Zend_translate


Where are allowed config parameters specified in the doc?

Regards,
Saša Stamenković


On Wed, Nov 18, 2009 at 11:33 AM, Thomas Weidner <[email protected]>wrote:

I am trying to use zend_Translate for translation in my application but it
is
not working :-((
I am using en.mo and en.po files for translation in my lang folder


"*.po" files are not recognised


 In my application.ini i am using

resources.translate.registry_key   = "Zend_Translate"
resources.translate.adapter         = "gettext"
resources.translate.data.directory  = APPLICATION_PATH "/lang/"


shouldn't it be  only data instead of data.directory ?

 resources.translate.disableNotices      = false


shouldn't it be options.disableNotices ?


 resources.translate.options.scan    = "filename"
resources.translate.options.logUntranslated = true
resources.translate.data.fileExt        = "php"


What should this be for a parameter ? fileExt is nowhere in the manual nor
in the API ?


 resources.translate.locale                      = "en_US"


in my Bootstrap.php my initialisation function goes as
protected function _initTranslation()
  {

$this->bootstrap('translate');
      $tr = $this->getResource('translate');
      Zend_Registry::set('tr', $tr);
      Zend_Form::setDefaultTranslator($tr);
print_r($tr->getList());


  }


And when i am trying to print this
<?php echo $tr->_('Register'); ?>

it gives me an error
Uncaught exception 'Zend_Translate_Exception' with message 'Error opening
translation file 'Array'.' in
C:\wamp\www\photoshop\library\Zend\Translate\Adapter\Gettext.php:85 Stack
trace: #0 C:\wamp\www\photoshop\library\Zend\Translate\Adapter.php(464):
Zend_Translate_Adapter_Gettext->_loadTranslationData(Array, 'en_US',
Array)
#1 C:\wamp\www\photoshop\library\Zend\Translate\Adapter.php(207):
Zend_Translate_Adapter->_addTranslationData(Array, 'en_US', Array) #2
C:\wamp\www\photoshop\library\Zend\Translate\Adapter.php(112):
Zend_Translate_Adapter->addTranslation(Array, 'en_US', Array) #3
C:\wamp\www\photoshop\library\Zend\Translate\Adapter\Gettext.php(51):
Zend_Translate_Adapter->__construct(Array, 'en_US', Array) #4
C:\wamp\www\photoshop\library\Zend\Translate.php(93):
Zend_Translate_Adapter_Gettext->__construct(Array, 'en_US', Array) #5
C:\wamp\www\photoshop\library\Zend\Translate.php(71):
Zend_Translate->setAdapter('gettext', Array, 'en_US', Array) #6
C:\wamp\www\photoshop\library\Zend\Application\Resource\Tra in
C:\wamp\www\photoshop\library\Zend\Translate\Adapter\Gettext.php on line
85


I am not getting the reason of the problem.....:confused:


Wrong parameter usage, see above

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com


Reply via email to