Why would you need to use multiple instances of Zend_Translate ?
You should use one application wide instance which holds your translations.
You can add translations manually (addTranslation) when you splitted them
model-based.
Or do you think that "Enter your name" is different between models ?
It's always the same translation regardless of the model behind.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Jurian Sluiman" <[email protected]>
To: <[email protected]>
Sent: Friday, August 28, 2009 1:10 PM
Subject: [fw-general] Integrate translation into models
Hi all,
I'm wondering about translations of models. I have products in my shop and
those products have a name and description, both translated. I'd like to
offer
the best fitted translation to the visitor (with Zend_Translate). But I
don't
know exactly how.
I can do my_translate_function($product->getNames()) or $product->getName()
where inside getName() there is a return my_translate_function($this-
getNames()).
I'm used to do the former, but the latter seems more logical. At the other
hand, with the second option every product has it's own Zend_Translate
instance. That would be an enormous overhead which I'd like to avoid.
What is the best option and how are you guys doing these things?
Regards, Jurian
--
Jurian Sluiman
Soflomo.com