valentin-morice/filament-json-column
A Filament package for working with JSON columns: view and edit nested JSON data in your forms and tables with a clean, readable interface. Adds a dedicated JSON column and field so structured data stays easy to inspect and manage in the admin panel.
The headline of v4.1.0 is translation support, so the first thing to do after composer update is find out what got translatable and how strings are resolved.
composer update <vendor>/<package> and then git diff composer.lock. A minor bump that adds i18n usually pulls in a lang/ directory and one or more publishable tags — check php artisan vendor:publish --list (or --provider="Vendor\Package\PackageServiceProvider") to see exactly which tags are new.php artisan vendor:publish --tag=<package>-lang (or --tag=<package>-translations). Read the published files before touching them — they are the authoritative list of keys and the fastest documentation you will get.fallback_locale matches Laravel's.en, then override it in lang/vendor/<package>/en/<file>.php with a sentinel value to prove the override wins.First use case worth wiring end-to-end: a request-scoped locale switcher plus one overridden string. That validates publishing, override path, and cache behaviour in a single pass.
Override, don't edit vendor files. Laravel's lang/vendor/{package}/{locale}/{file}.php convention means your customised copy lives in your repo and survives upgrades; the published file is just a starting point. Keep overrides minimal (only the keys you actually change) so new keys arrive with future releases instead of being frozen at v4.1.0 wording.
Set the locale deliberately, per surface. The common bug is locale leaking between contexts. Use a small middleware for web requests:
public function handle($request, Closure $next)
{
app()->setLocale(
$request->user()?->locale
?? $request->session()->get('locale')
?? $request->getPreferredLanguage(config('app.supported_locales'))
?? config('app.fallback_locale')
);
return $next($request);
}
Locale-aware queued work. Anything the package renders inside a job or notification must carry its locale with it. Prefer ->locale($user->locale) on mailables/notifications, or app()->setLocale() at the top of the job's handle() — never rely on the locale present when the job was dispatched, because the worker's default is whatever config('app.locale') says.
Respect the package's key namespace. If the release exposes __('<package>::messages.foo'), use it rather than duplicating English strings in your Blade. Mixed strategies are how you end up with half a page translated.
Parameterised and pluralised strings. Pass data explicitly, not via concatenation:
trans_choice('<package>::messages.items', $count, ['count' => $count]);
Concatenating translated fragments breaks the moment a language reorders the sentence — a real risk in the languages you're likely adding next.
Validation and API messages. If the package ships validation rules, check whether it now reads from lang/{locale}/validation.php or its own namespace. For JSON APIs, return message fields through the same translator and set Accept-Language handling in middleware so clients control it per request rather than per session.
Testing. Assert on behaviour, not on the English string:
app()->setLocale('fr');
$this->assertSame(__('<package>::messages.saved'), $response->json('message'));
This keeps tests green when copy changes and actually proves the translation path works, which a hardcoded English assertion does not.
php artisan config:cache freezes locale config, and long-running workers (Octane, Horizon) will happily serve a stale translator. After changing lang files or locale config, run php artisan optimize:clear before debugging anything else — it is the cause of a large share of "translations don't update" reports.de renders in en and looks fine. In non-production, set 'fallback_locale' => null (or add a test that diffs key sets across locales) so gaps surface loudly instead of shipping as mixed-language UI.__() on the raw value.Carbon::setLocale()/app()->setLocale(), not the new translation files.left/right classes and physical padding. Translation support in the PHP layer frequently arrives before the CSS catches up.How can I help you explore Laravel packages today?