Skip to main content

Localization

Every string the shipped UI puts in front of a user — headings, labels, placeholders, buttons, empty states, toasts, validation messages, status badges and the accessible names a screen reader announces — is translated, never hardcoded.

The package ships seven languages — English, German, Spanish, French, Italian, Dutch and Portuguese — and translations resolve under the webhooks namespace, one file per surface plus one that belongs to the language rather than to any screen:

FileSurface
dashboardthe observability dashboard
self-servicethe endpoint portal
managementthe operator console (both stub variants)
pulsethe Laravel Pulse card
paginationthe shared pagination control (page links + screen-reader labels)
formatsnone in particular — the thousands and decimal separators every screen counts with
__('webhooks::dashboard.table.replay');
__('webhooks::self-service.form.register');
__('webhooks::management.form.submit');

The rendered locale is simply the host app's (app()->getLocale()), so nothing needs configuring — set the locale as you already do and the UI follows.

formats is the odd one, and it is the one most likely to be the reason you came here. It holds two characters — thousands and decimal — and they decide how every number on every shipped screen reads. They are ICU's for each of the seven locales, so a French deployment already groups with a narrow no-break space; override them when your house style disagrees, not to fix a locale.

Date patterns are translated too, but they are not in formats — each surface carries its own under its own formats key, so the dashboard's live in dashboard.php. The two names collide; the file is about numbers.

Status and health values are translated for display only; what is persisted (succeeded, failed, degraded, …) never changes. The endpoint form carries its own validation messages, so a refused save reads correctly even on a host that never translated Laravel's own validation lines.

Overriding a string

Publish the translations and edit them in your app:

php artisan vendor:publish --tag=webhooks-lang

They land in lang/vendor/webhooks/{locale}/, where the host's file wins over the package's for every key it defines — copy only the keys you want to change.

Adding a locale

Publish as above, copy lang/vendor/webhooks/en to your locale's directory (lang/vendor/webhooks/fr, say) and translate the values, leaving the keys untouched.

Any key you leave out falls back to the package's English, so a partial translation still renders — and you can fill the rest in later.