This package provides a migration and a model to extend the spatie/laravel-translation-loader so you can store your translations in columns instead of one json field. One column per locale.
You can install the package via composer:
composer require delta-solutions/translations
Follow the installation steps as explained in the Spatie docs https://github.com/spatie/laravel-translation-loader
Define the locales in the translation-loader.php
config file, one locale per database column. This is used in the migration to create the database fields.
'locales' => ['nl', 'fr', 'en', 'de', 'es']
You can publish and run the migrations with:
php artisan vendor:publish --tag="translations-migrations"
php artisan migrate
This will create the fields in your database as specified in the locales array
Use the model from this package as the model for the spatie/laravel-translation-loader. This is configured via the model
in the config. Change it to
'model' => DeltaSolutions\Translations\Models\LanguageLine::class,
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.