Download the PHP package empuxa/laravel-translation-manager without Composer
On this page you can find all versions of the php package empuxa/laravel-translation-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download empuxa/laravel-translation-manager
More information about empuxa/laravel-translation-manager
Files in empuxa/laravel-translation-manager
Package laravel-translation-manager
Short Description A smart translation manager for Laravel.
License MIT
Homepage https://github.com/empuxa/laravel-translation-manager
Informations about the package laravel-translation-manager
Laravel Translation Manager
This package provides a web interface to manage your Laravel application translations. While the concept is heavily inspired by barryvdh/laravel-translation-manager, this package is a complete rewrite with a different approach to provide a better non-developer user experience:
- there is a non-editable default language, to separate development from translation
- it can export to sub-folders: for example, you can now have a
lang/en/dashboard/charts.php
file - all translation strings are on one page, that's based on Tailwind CSS
- it has (some) tests 🫣
However, currently there are also some disadvantages (feel free to contribute!):
- it does only read and export PHP files, no JSON
- vendor translations are not supported
- since all strings are on one page, big projects might have performance issues
Installation
This package requires Laravel 9.33+. You can install the package via composer:
Afterward, copy the vendor files:
Finally, run the migrations:
Don't forget to also update the config file config/translation-manager.php
to your needs!
Usage
Local Storage / Single Server Setup
By default, the translation manager is available at /translation-manager
. However, you can change the route in the config file. Before you can edit translations, you must also set up the output languages. The default language isn't editable to separate development and translation.
To push the translations into the database, you need to run the following command:
It's now possible to edit any language string via the web interface and save them to the database. If a language string already exists, it won't be overwritten. You can force that behavior by using the --force
flag.
Before you can use the translations in your application, you need to export them to PHP files that will get stored in the lang
folder. You can do that by running the following command:
Cloud Storage / Multi Server Setup
The best way to use the translation manager in a cloud setup is to run a single server instance, where the translators can edit the translations. However, you might also want to push the translations to other environments. That's where cloud storage comes into play.
By using the translation-manager:push-to-storage
command, you can push any lang file to the storage disk defined in the config. With the translation-manager:pull-from-storage
command, you can then pull the translations from the storage disk.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Marco Raddatz
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-translation-manager with dependencies
spatie/laravel-package-tools Version ^1.0
illuminate/config Version ^9.33|^10.0|^11.0
illuminate/contracts Version ^9.33|^10.0|^11.0
illuminate/database Version ^9.33|^10.0|^11.0
illuminate/queue Version ^9.33|^10.0|^11.0
illuminate/routing Version ^9.33|^10.0|^11.0
illuminate/support Version ^9.33|^10.0|^11.0
illuminate/view Version ^9.33|^10.0|^11.0