backpack/langfilemanager
Backpack LangFileManager is a Laravel package that adds a translation manager to Backpack admin panels. Browse language files, search and edit translation keys and values, and manage multilingual strings directly from the browser without touching files by hand.
Install the package in your Backpack application:
composer require backpack/langfilemanager
php artisan vendor:publish --provider="Backpack\LangFileManager\LangFileManagerServiceProvider"
The provider publishes config/backpack/langfilemanager.php and the package views into resources/views/vendor/backpack/langfilemanager/.
Register the entry point. Add a menu item to your Backpack sidebar (resources/views/vendor/backpack/base/inc/sidebar_content.blade.php or routes/backpack/custom.php, depending on your Backpack version):
['route' => 'language.index', 'label' => 'Languages', 'icon' => 'la la-language'],
Confirm the exact route name the provider registers with php artisan route:list --name=language — don't guess.
First use case: open the interface, pick en, edit auth.php, change a string, save. Then check git diff lang/en/auth.php (or resources/lang/... on Laravel <9). If the file changed on disk, everything is wired correctly. That single loop — pick locale → pick file → edit → save — is the whole package.
Where to look first:
config/backpack/langfilemanager.php) controls which locales are listed and whether creating new language files is allowed.vendor/backpack/langfilemanager/src/app/Http/Controllers/LanguageFileController.php is the entire product; it's small enough to read in one sitting and answers most questions faster than the README.Translator-facing workflow. The package is a thin file editor with no database, no roles, and no audit trail. Give translators a dedicated admin account and guard the language route with your own middleware (e.g., only role == 'translator'), then periodically commit git diff lang/ back into the repo. This is the intended use: developers stop being a bottleneck for string changes, and the "storage" stays files in version control.
Bootstrapping a new locale. Copy the base locale directory or add the locale key in the package config, then use the UI to create/populate files for it. Because there's no migration step, adding a locale is a pure file operation — which is also why you must remember to actually commit it.
Editing nested keys. PHP translation files display as flattened file.key entries. When you add a key, use dot notation so nested arrays are created the way Laravel's __() resolves them; typing auth.failed and typing auth > failed yield the same result but the wrong one produces a flat literal key.
JSON alongside PHP. Frontend strings from lang/{locale}.json are edited in the same UI as the PHP files. Pick one convention for your project — if a string lives in both auth.php and en.json, translators will update one and miss the other.
Extending rather than forking. There are two low-friction extension points: (1) the config, to restrict which locales appear; (2) overriding the published views and/or remapping the route to your own controller for custom behavior. Add audit logging, permission checks, or extra post-save hooks in a wrapper route/middleware instead of editing vendor code — the package is small but not actively developed.
Deployment split. Decide whether translation edits are deploy artifacts or code. The common safe pattern: enable the editor on staging/development only, and on production remove the menu item and restrict the route. Otherwise, translation changes drift away from Git and the next deploy silently reverts them.
lang/ (or resources/lang/). Failures surface as file_put_contents errors in storage/logs/laravel.log; the UI often just fails to save without an obvious message.lang/ at the project root; older versions use resources/lang/. Confirm which the installed version of the package expects — this is the most common "it shows no files" cause.config:cache / route:cache in production. Clear both after installing and after changing the locale list. A cached config that predates the package will hide the menu item and the locale list.lang/ only. To edit translations shipped inside packages, publish them first with php artisan vendor:publish, then edit the copy.lang/ directories diverge silently: a locale in config with no directory looks empty, a directory with no config entry doesn't show. Keep the config aligned with config/app.php's locale and your supported set.{!! !!}) or inserted into JS, editing it here is a code-injection vector — restrict who gets access.dd() inside the controller's update() — debugging the package is faster than filing an issue.How can I help you explore Laravel packages today?