Skip to content

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

@Slamdunk

Description

@Slamdunk

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(),
            ],
        ],
    ],
];

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions