Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Nova Chained Translation Manager Laravel Package

statikbe/laravel-nova-chained-translation-manager

A Laravel Nova tool that integrates the Chained Translation Manager, letting you browse, search, and edit translation strings across languages in one place. Manage translation keys and values per locale directly from your Nova admin panel without leaving the interface.

View on GitHub
Deep Wiki
Context7

Getting Started

Prerequisites. This tool is a thin Nova UI on top of statikbe/laravel-chained-translator. It will not work standalone — install and configure the chained translator first, because the tool reads its locale/source configuration to know which languages to expose.

composer require statikbe/laravel-chained-translator
composer require statikbe/laravel-nova-chained-translation-manager

Publish the chained translator config (this is the file that actually drives the tool):

php artisan vendor:publish --provider="Statikbe\LaravelChainedTranslator\ChainedTranslatorServiceProvider"

Set your source locale and the list of locales in config/chained-translator.php. The translation manager uses this to decide which columns/languages to render — if a locale is missing here, it simply won't appear in the UI.

Register the Nova tool. In app/Providers/NovaServiceProvider.php (or via Nova::tools([...]) in boot()):

public function tools()
{
    return [
        new \Statikbe\NovaChainedTranslationManager\ChainedTranslationManager(),
    ];
}

Check the package's src/ for the exact tool class name if your version differs — the README's install snippet is authoritative for the version you pull in.

First use case. Log into Nova, open the Translation Manager entry in the sidebar. Pick a translation group (JSON file / PHP namespace), pick a locale, and edit strings inline. Saving writes directly back to lang/ (or resources/lang/ on older Laravel). This is the fastest path for "marketing wants to fix a typo without a deploy."

Implementation Patterns

Editing workflow as the primary loop. The realistic day-to-day use is: a developer adds __('messages.foo') in code, ships it, then a translator opens Nova → Translation Manager → messages group → fills in each locale. Treat the tool as an editorial surface, not as the source of truth for key naming — keeping key creation in code review prevents untranslated keys from silently appearing only in the UI.

Reuse the chained translator for content, not just strings. The bigger win is combining this UI with the chained translator for Eloquent-backed content (pages, products) that need fallback chains. Pattern: models use the chained translator trait, and the Nova tool manages the static lang/ files. Don't mix the two responsibilities — the tool writes files, the trait reads model attributes.

Namespace/group organisation. Keep groups small and mapped to feature areas (auth, validation, emails, pages). Large monolithic messages.json files are the main source of UI pain (slow load, hard to find keys). If you inherit a huge file, split it before relying on the UI.

Local development loop. Configure the tool to be visible only to admins in production:

public function canSee(NovaRequest $request)
{
    return $request->user()->isAdmin();
}

Locally, leave it open so developers can quickly sanity-check strings across all configured locales without running an artisan dump command each time.

Deployment handoff. Because edits go straight to the filesystem, the output is just files in lang/ — commit them like any other code. A workable pattern is: translators edit in Nova on staging → a developer pulls the changed files → PR → merge → deploy. Avoid letting editors write to production filesystem unless the deploy pipeline can reconcile those changes back into git, otherwise the next deploy wipes them.

Integration with existing translation files. The tool reads whatever is already in lang/. Seed it by running your normal php artisan lang:publish / copying vendor language files first, so the package's groups show up alongside your app's own.

Gotchas and Tips

The tool writes to disk at runtime. In containerised, read-only, or ephemeral filesystems this silently fails or throws. If you deploy with a read-only lang/ volume, either mount it writable for admins or disable the tool in production entirely.

Config caching. After changing config/chained-translator.php (adding a locale or changing the source), run php artisan config:clear. A cached config will make the UI show stale locales, which is a very common "why can't I translate to X" bug.

Fallback chains mask missing translations. With chained fallbacks enabled, a missing key in fr will render the en value at runtime, so the UI looks fine while a translation is technically absent. Use the tool's missing-key indicator (or diff the locale columns) rather than eyeballing rendered pages.

Permissions. The web process needs write access to lang/ (and resources/lang/, and any custom translator.paths). File ownership mismatches after a deploy are the usual culprit when saves fail without a useful error — check storage/logs/laravel.log and the PHP error log.

Nova version compatibility. This package tracks Nova 4-era APIs. Pinning Nova across major versions (3 → 4 → 5) can break tool registration or the NovaServiceProvider shape. Keep the Nova and tool versions in lockstep, and check the 2024-03-14 release notes for the supported Nova range before upgrading either.

JSON escaping churn. Saving via the UI will re-encode JSON files, which can produce large diffs (key order, unicode escaping) unrelated to the actual edit. Review PRs from editor saves for formatting noise; a stable JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE convention in the tool reduces it, but verify per version.

Authorization is opt-in. The tool exposes translation contents; default to overriding canSee() / authorize() rather than trusting the sidebar entry to be hidden. Anyone who can guess the Nova tool URL should still be rejected by authorize().

Extension points. If the built-in group list doesn't match your layout (custom translation loader, non-standard paths), look at the package config for group/path overrides before forking — the chained translator's config is the intended seam. For anything deeper (per-tenant translations, DB-backed strings), you're better off building a small custom Nova tool on top of the chained translator directly than patching this one.

Small ecosystem, small community. 16 stars means limited issue triage — read the source when behaviour is unclear rather than expecting docs, and pin the version in composer.json since breaking changes may land without a major bump.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager