A Laravel Nova field for astrotomic/laravel-translatable.
rslanzi/nova-translatable is a Laravel package for a laravel nova field for astrotomic/laravel-translatable..
It currently has 6 GitHub stars and 48 downloads on Packagist (latest version 0.2.3).
Install it with composer require rslanzi/nova-translatable.
Discover more Laravel packages by rslanzi
or browse all Laravel packages to compare alternatives.
Last updated

This Laravel Nova field allows you to manage translated fields with astrotomic/laravel-translatable.
laravel/nova: ^2.9 || ^3.0
astrotomic/laravel-translatable: ^11.0
waynestate/nova-ckeditor4-field: ^0.6.0
Firstly, set up astrotomic/laravel-translatable.
Install the package in a Laravel Nova project via Composer:
# Install nova-translatable
composer require rslanzi/nova-translatable
# Publish configuration (optional, but useful for setting default locales)
php artisan vendor:publish --tag="nova-translatable-config"
Single line text field
NovaTranslatable::make('Title')
->singleLine()
Multi line text field
NovaTranslatable::make('Text')
->hideFromIndex()
Text field with chars counter
NovaTranslatable::make('Title')
->singleLine()
->counted()
Exceeded the threshold, the counter turns red.
NovaTranslatable::make('Title')
->singleLine()
->counted()
->maxChars(60)
->warningAt(50),
Exceeded the warning threshold, the counter turns orange, exceeded the max chars threshold, the counter turns red.
NovaTranslatable::make('Title')
->singleLine()
->counted()
->maxChars(60)
->warningAt(50),
CKEditor WYSIWYG editor. Usefull to manage HTML fields.
NovaTranslatable::make('Text')
->ckeditor()
Trix field
NovaTranslatable::make('Text')
->trix()
Automatically populate a slug field based on another field. Title in this case.
NovaTranslatable::make('Title')
->sluggable('Slug'),
NovaTranslatableSlug::make('Slug')
->hideFromIndex(),
Code field. Use a syntax highlighted text area.
NovaTranslatable::make('Text')
->code()
Code field. Use a syntax highlighted text area.
NovaTranslatable::make('Text')
->code()
->language('php')
The Code field's currently supported languages are: dockerfile, javascript, markdown, nginx, php, ruby, sass, shell, vue, xml, yaml
NovaTranslatable::make('Text')
->json()
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Do you like this project? Support it by donating
If you discover a security vulnerability within Nova Translatable, please send an e-mail to Riccardo Slanzi at [email protected]. All security vulnerabilities will be promptly addressed.
Nova Translatable is free software distributed under the terme of the MIT license.