dragonfly / translation-manager
A laravel translation GUI, built with Vue
Requires
- php: ~5.6|~7.0
- illuminate/support: 5.0.x|5.1.x|5.2.x|5.3.x
- illuminate/translation: 5.0.x|5.1.x|5.2.x|5.3.x
- symfony/finder: ~2.3|~3.0
Requires (Dev)
- lord/laroute: ^2.3
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2023-03-18 11:31:34 UTC
README
A customizable laravel translation management SPA built with vue.
This was originally planned to be just a fork of barryvdh/laravel-translation-manager, but the amount of changes I made were substantial enough for me to split it off and present it to you like this.
Install
Via Composer
$ composer require dragonfly/translation-manager
Add the service provider in your app
config.
DragonFly\TranslationManager\TranslationManagerServiceProvider::class,
Publish the config file
$ php artisan vendor:publish --tag=config
Run migrations
$ php artisan migrate
Publish the view (optional)
$ php artisan vendor:publish --tag=view
Publish and compile assets
First let's publish the assets to resources/assets/js/dragonfly/translations
:
$ php artisan vendor:publish --tag=assets
Next up we'll need to install a few packages from NPM. Laravel 5.3 comes bundled with Vue 2, Vue-resource 2 and Lodash 4.16, if you don't have them you need to install these as wel.
$ npm install vuex vue-router
Next up you'll need to add this command to your gulpfile.js
:
mix.webpack('dragonfly/translations/app.js', './public/js/dragonfly-translations.js');
Now everything's set to compile, let's run gulp
$ gulp
Configuration
There a few options you can set after you've exported the translations.php
config file.
Routes
- routes.prefix: Set a prefix for the translation manager's routes.
- routes.middleware: Here you can assign extra middleware for the routes (perfect for auth restrictions).
Features
- features.create_locales: Toggle the possibility to create new locales.
- features.create_delete_translations: Toggle the possibility to delete single translation keys.
- features.create_truncate_translations: Toggle the possibility to truncate the entire translation database.
Group exclusion
- exclude_groups: Define translation groups you don't want to show up in this tool.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email maxim@happydemon.xyz instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.