Skip to content

Callback to return custom string on MissingTranslationEvent #66

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

Activity

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

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