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

[spiral/translator] Load translations from many directories #951

Closed
gam6itko opened this issue Jul 11, 2023 · 1 comment · Fixed by #996
Closed

[spiral/translator] Load translations from many directories #951

gam6itko opened this issue Jul 11, 2023 · 1 comment · Fixed by #996

Comments

@gam6itko
Copy link
Contributor

gam6itko commented Jul 11, 2023

Description

I have separate project with my own Checkers. Also this repo contains translations for validation errors.
At the moment, to include translations I have to copy the translation files manually to app/locale folder.

Example

translator config file should look like this

return [
    'locale' => 'en',
    'cacheLocales' => !in_array(env('APP_ENV'), ['local']),

    'directories' => [
        directory('locale'),
        directory('vendor').'/spiral/validator/locale',
        directory('vendor').'/gam6itko/my-checkers/locale',
    ],
];
@gam6itko
Copy link
Contributor Author

Associated with spiral/validator#12

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