setDefaultTranslator() #2594

Closed
zfbot opened this Issue Sep 28, 2012 · 4 comments

Projects

None yet

5 participants

@zfbot
Collaborator
zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-568
Issue Type:New Feature
Reporter:Reindl Bernd
Created:09/18/12
Assignee:weierophinney
Components:Zend\Captcha Zend\Validator

Description

The localizationfiles in the resourcefolder of the ZF2 package are multiple files (Zend_Validator.php, Zend_Captcha.php). So i can use them only with different textDomains (in my case 'validator' and 'captcha').

To prevent setting the textdomain by each validatorelement i set the default translator and the default tranlatortextdomain by \Zend\Validator\AbstractValidator::setDefaultTranslator($translator, 'validator');

But \Zend\Captcha\AbstractAdapter is a subclass of \Zend\Validator\AbstractValidator and uses the same Domain like AbstractValidator because there is no own implementation for setDefaultTranslator(). Is it possible to implement setDefaultTranslator() and the other static functions to support different domains for validators and Captcha?
Or is there an other solution to load multiple languagefiles?

PS: Excuse my bad English :)

@zfbot
Collaborator
zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-568

Known GitHub users mentioned in the original message or comment:
@weierophinney

@ralphschindler
Member

@DASPRiD can you have a look at this, and determine if we can close it?

@DASPRiD DASPRiD was assigned Feb 11, 2013
@DASPRiD
Member
DASPRiD commented Mar 4, 2013

@ralphschindler Will take a look at it.

@ThaDafinser

@DASPRiD any progress on this?

Personally i think there are so "less" translations needed for captcha that it should be in the same translortTextDomain than the "validator" (takem from his example).... last but not least captcha is also a "validator".

This feature would add more problems than it solves IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment