Download the PHP package xdroidteam/translation without Composer
On this page you can find all versions of the php package xdroidteam/translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xdroidteam/translation
More information about xdroidteam/translation
Files in xdroidteam/translation
Package translation
Short Description Change standard Laravel file-based translation to DB.
License MIT
Informations about the package translation
Laravel DB Translation
Change the standard Laravel file-based translation to DB based.
Key features
- Easy GUI for modifying translations
- The new keys will be automatically added to the DB
- It can easily import lang files to the DB
- Translation is stored in the cache, and editing it automatically refreshes the cache from DB. We use cache tags, so regular file or database cache drivers doesn't work, please use memcached instead.
- It is now showing the missing tranlations fields for each language and group. Also you can toogle views between "Show only missing translations" and "Show all translations".
- Now you can export database to .CSV.
Installation
Below laravel 6.x use version 1.5.x, for Laravel/Lumen 6.x, 7.x use version 2.x
Require this package in your composer.json and run composer update:
"xdroidteam/translation": "1.5.*"
or run
directly.
After updating composer, add the ServiceProvider to the providers array in config/app.php
Deploy migration and config file.
You need to run the migrations for this package.
Add following line to your .env file:
Import existing language files to DB:
or import with override existing records:
Routes are added in the ServiceProvider, available at http://yourdomain.com/translations
You can change the route prefix in the deployed config file config/xdroidteam-translation.php
. Also you can modify the middleware or exclude translation groups (excluded groups will not appear on the GUI). See the example below.
You can use other Translation model, to overwrite methods. For example:
Export
You can export your db to a .CSV file, with call this function: