Add translation to your Nova Resources. The translations will be stored in a translatables table and not in a JSON format in your existing tables as many packages out there do.
You can install the package via composer:
composer require marshmallow/translatablePublish configuration and assets
php artisan vendor:publish --provider="Marshmallow\Translatable\ServiceProvider"
Run the install command
php artisan translatable:install
If you prefer to install manually or the automatic installation doesn't work for your setup, follow these steps:
Add the following line to your config/app.php file, right after the 'locale' configuration:
'locale' => env('APP_LOCALE', 'en'),
'default_locale' => env('APP_LOCALE'),Make sure you have the APP_LOCALE environment variable set in your .env file:
APP_LOCALE=en# Sync existing translation files to database
php artisan translatable:sync-file-to-database
# Sync missing translations
php artisan translatable:sync-missing
# Generate Nova resources (if using Laravel Nova)
php artisan marshmallow:resource Language Translatable --force
php artisan marshmallow:resource Translation Translatable --forcePlease reference the official documentation at Marshmallow Documentation
This package contains an integration with Deepl. This integration will add a button to the translations index view, that will automaticly translate your text via Deepl. Just add the following ENV variable to use this awesome feature.
TRANSLATABLE_DEEPL_API_KEY=This will use the free version of the Deepl API. If you have a paid subscription, you can add the following as well.
TRANSLATABLE_DEEPL_API_PATH=https://api.deepl.comPlease see CHANGELOG for more information what has changed recently.
composer testIf you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.

