-- samuel verdier <[EMAIL PROTECTED]> wrote
(on Thursday, 31 July 2008, 10:10 PM +0200):
> Ok but i think that do two different functions for tranlate label and 
> error would be nice :
>
> $this->form->setLabelTranslators($this->translateFormLabel);
> $this->form->setErrorTranslators($this->translateFormError);
>
> no ?

No. This just makes the API more confusing. Feel free to extend the
classes to do this, but I can assure you it won't be in trunk anytime
soon, if ever.

(The form component is complex enough as it is...)

> ----- Original Message ----- From: "Thomas Weidner" 
> <[EMAIL PROTECTED]>
> To: "Samuel Verdier" <[EMAIL PROTECTED]>; <[email protected]>
> Sent: Thursday, July 31, 2008 1:41 PM
> Subject: Re: [fw-general] zend translate and zend form
>
>
>> But this can not work...
>> I will give you an example:
>>
>> Let's say you have the source 'Hello'.
>> You have translated it in both instances but you transated it 
>> differently in both of them.
>>
>> How should Zend_Form know which instance to use ? Which is the proper 
>> one for this situation ?
>> As I said the only working way is to use one instance and add the 
>> sources when they are needed.
>> There is no need for multiple instances at all.
>> Just add the sources before you want to use them.
>>
>> Greetings
>> Thomas Weidner, I18N Team Leader, Zend Framework
>> http://www.thomasweidner.com
>>
>> ----- Original Message ----- From: "Samuel Verdier" 
>> <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Thursday, July 31, 2008 12:47 PM
>> Subject: RE: [fw-general] zend translate and zend form
>>
>>
>> I have two adapters one for all errors and one by module because my
>> application is modular.
>> In every module the file language is include in a subdirectory.
>> The file of error is for all application
>>
>> Cordialement,
>>
>>
>> Samuel verdier - Directeur technique
>> [EMAIL PROTECTED]
>>
>>
>> -----Message d'origine-----
>> De : Thomas Weidner [mailto:[EMAIL PROTECTED]
>> Envoyé : jeudi 31 juillet 2008 00:13
>> À : samuel verdier; [email protected]
>> Objet : Re: [fw-general] zend translate and zend form
>>
>> Why do you seperate the translation adapters ?
>> Simply use one adapter where you add the files you want to translate. Use
>> addTranslation instead of multiple instances. Add only the modules you  
>> need.
>>
>> Greetings
>> Thomas Weidner, I18N Team Leader, Zend Framework
>> http://www.thomasweidner.com
>>
>> ----- Original Message ----- From: "samuel verdier" 
>> <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Wednesday, July 30, 2008 11:47 PM
>> Subject: [fw-general] zend translate and zend form
>>
>>
>>> Hi All,
>>>
>>> I have multi file for translate (tmx) and i want to merge it
>>>
>>> One file for global error form, others by controler
>>>
>>> $this->translateFormError = new Zend_Translate('tmx', TMX_DIR .
>>> '/form_errors.tmx', $this->lang);
>>> $translateController = new Zend_Translate('tmx', MODULES_DIR . '/' .
>>> $module . '/languages/' . $module . '_' . $controller . '.tmx',
>>> $this->lang);
>>> $this->form->setTranslator($this->translateFormError);
>>> $this->form->setTranslator($this->translateController);
>>>
>>> How can i solve my probleme with the zend 1.6RC1 ?
>>>
>>> It is possible to do this for futur version :
>>> $this->form->setTranslators(array($this->translateFormError,
>>> $this->translateController));
>>>
>>> Samuel
>>
>>
>>
>>
>

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to