View Single Post
  #1 (permalink)  
Old 03-21-2008, 11:25 AM
PoolSnoopy PoolSnoopy is offline
Junior Member
 
Join Date: Mar 2008
Posts: 2
Lightbulb [SOLVED] $translate->isAvailable() always true?

Dear fellows,

I have difficulties using or understanding Zend_Translate. Imagine the following code:

try {
Zend_Registry::get('translation');
} catch (Zend_Exception $e) {
$translate = new Zend_Translate('csv', '../translation/english.csv', 'en');
$translate->addTranslation('../translation/german.csv', 'de');
$translate->addTranslation('../translation/english_US.csv', 'en_US');
Zend_Registry::set('translation', $translate);
}
....
$translate = Zend_Registry::get('translation');

then I would expect that $translate->isAvailable('xx') to be false. but it is true. so how can I check whether a translation for the desired language is here or not?

any help highly appreciated

Last edited by PoolSnoopy : 03-21-2008 at 02:34 PM. Reason: SOLVED
Reply With Quote