TranslationMan Package For Laravel
This small package gives you all functionlaity you need to manage your laravel language files with simple forms you can integrate in your application layout., (*1)
Features
- Lanaguages Creation/Deletion.
- Language Files Creation/Deletion.
- Files' array modification with a simple form (Allows multi dimensional arrays with dots in the index column).
Installation
Via Composer composer require lilessam/translationman, (*2)
Add Lilessam\Translationman\TranslationmanServiceProvider::class to your providers array in config/app.php., (*3)
You will also have to set resources/lang folder permissions to 777., (*4)
Publish Config and Views
php artisan vendor:publish --provider="Lilessam\Translationman\TranslationmanServiceProvider"
Now views files will be published in resources/views/vendor/translationman., (*5)
You will realize that all files contains only basic bootstrap forms. You will have to integrate this forms as you like., (*6)
Routes
When you publish the service provider files you will see translationman.php file in Config folder. So there you can url_prefix. Default is translations so it can be viewed by app.dev/translations., (*7)
You can also provide a middleware for the package routes by modifying middleware in the config file., (*8)
The middleware can be string or an array of middlewares (BUT CANNOT BE EMPTY STRING)., (*9)
Working with VueJS Components
If you would like to pass your language array to a VueJS component you need to use json_lang helper which will pass your lang array with no problems., (*10)
<my-component :lang='{!! json_lang("components.mine") !!}'></my-component>