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

[WIP] Translator afterResolve event #17

Closed
wants to merge 4 commits into from

Conversation

jaxwilko
Copy link
Member

Adds a new event that gets fired after an a translation has been resolved. Acts identically to beforeResolve except for it also passes the found line into the event, allowing for modifications to be made and fallback handlers for missing lines to be created.

Example:

Event::listen(
    'translator.afterResolve',
    function (string $key, array $replace, ?string $line, ?string $locale) {
        // handle things 
        return $someVar;
    }
);

LukeTowers added a commit that referenced this pull request Mar 24, 2021
@LukeTowers LukeTowers closed this Mar 24, 2021
@LukeTowers LukeTowers deleted the wip/translator-after-resolve-event branch March 24, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants