Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: favor Translator::factory config over DelegatorFactory #10

Open
Slamdunk opened this issue Mar 25, 2020 · 1 comment
Open

Doc: favor Translator::factory config over DelegatorFactory #10

Slamdunk opened this issue Mar 25, 2020 · 1 comment

Comments

@Slamdunk
Copy link
Contributor

Hi, the only doc available suggests creating a DelegatorFactory to inject this very resources: https://docs.laminas.dev/laminas-i18n-resources/usage/#automating-resource-injection

But it is 99% likely that, in that context, the user is using the entire ServiceManager capability, and as such the Translator::factory configs can be used as well: https://docs.laminas.dev/laminas-i18n/translator/factory/#setting-translation-file-patterns

$config = [
    'translator' => [
        'translation_file_patterns' => [
            [
                'type'     => 'phpArray',
                'base_dir' => \Laminas\I18n\Translator\Resources::getBasePath(),
                'pattern'  => \Laminas\I18n\Translator\Resources::getPatternForValidator(),
            ],
        ],
    ],
];
@froschdesign
Copy link
Member

@Slamdunk
Thanks for report this problem. The documentation is currently being revised to prevent the splitting of information.
At the moment some informations for the usage can be found in documentation of this component and some in laminas-validator. In laminas-captcha the topic about translation is missing.

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

No branches or pull requests

2 participants