marshmallow / translatable
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.
Installs: 13 237
Dependents: 3
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- laravel/nova: ^4.0|^5.0
- marshmallow/commands: ^v1.2.1
- marshmallow/helpers: ^v2.11.1
- marshmallow/live-update: ^v2.0
- marshmallow/nova-advanced-image: ^v2.0
- marshmallow/sluggable: ^v1.3.0
- spatie/laravel-package-tools: ^1.13
Requires (Dev)
- laravel/nova-devtool: ^1.0
- dev-main
- 5.1.0
- 5.0.2
- 5.0.1
- 5.0.0
- v2.x-dev
- v2.13.3
- v2.13.2
- v2.13.1
- v2.13.0
- v2.12.0
- v2.11.2
- v2.11.1
- v2.11.0
- v2.10.2
- v2.10.1
- v2.10.0
- v2.9.1
- v2.9.0
- v2.8.0
- v2.7.1
- v2.7.0
- v2.6.0
- v2.5.0
- v2.4.0
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.20.4
- v1.20.3
- v1.20.2
- v1.20.1
- v1.20.0
- v1.19.0
- v1.18.0
- v1.17.4
- v1.17.3
- v1.17.2
- v1.17.1
- v1.17.0
- v1.16.0
- v1.15.1
- v1.15.0
- v1.14.1
- v1.14.0
- v1.13.4
- v1.13.3
- v1.13.2
- v1.13.1
- v1.13.0
- v1.12.1
- v1.12.0
- v1.11.0
- v1.10.4
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.1
- v1.9.0
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.1
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-357-add-the-custom-config-to-the-install-command
- dev-355-fix-usage-of-the-default-locale
- dev-350-add-a-available-for-translation-column-to-languages
- dev-349-add-a-translatable-sequence-column-to-languages
- dev-348-add-a-little-star-icon-to-the-default-language
- dev-347-auto-translator-button-is-not-loaded-for-tiptap-fields
- dev-345-n1-query-issue-in-getbytranslatedslug-method
This package is auto-updated.
Last update: 2025-09-16 14:17:49 UTC
README
Nova Translatable
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.
Installation
You can install the package via composer:
composer require marshmallow/translatable
Publish configuration and assets
php artisan vendor:publish --provider="Marshmallow\Translatable\ServiceProvider"
Run the install command
php artisan translatable:install
Manual Installation
If you prefer to install manually or the automatic installation doesn't work for your setup, follow these steps:
1. Add Default Locale Configuration
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'),
2. Set Environment Variable
Make sure you have the APP_LOCALE
environment variable set in your .env
file:
APP_LOCALE=en
3. Run Migration and Synchronization Commands
# 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 --force
Usage
Please reference the official documentation at Marshmallow Documentation
Use Deepl integration
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.com
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
composer test
Security
If you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.