Skip to content

Callback to return custom string on MissingTranslationEvent #66

@tomaszkane

Description

@tomaszkane

What steps will reproduce the problem?

$thisMessageIdNotExist = 'xyz';
echo $translator->translate($thisMessageIdIsNotExist);

What do you get?

xyz

What do you want to get?

Oh no, "xyz" is not translated yet!

When event MissingTranslationEvent was triggered I want to return result of my callback not messageId string or fallbackLocale result.

Telegram conversation

Additional info

Q A
Version 1.0.2
PHP version 8.0
Operating system KDE Neon

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions