PHPackages                             okaspar/nova-translatable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. okaspar/nova-translatable

ActiveLibrary

okaspar/nova-translatable
=========================

A Laravel Nova field for spatie/laravel-translatable forked from mrmonat/nova-translatable to enable RTL support

2.0.2(6y ago)08MITVuePHP &gt;=7.1.0

Since Aug 24Pushed 6y agoCompare

[ Source](https://github.com/okaspar/nova-translatable)[ Packagist](https://packagist.org/packages/okaspar/nova-translatable)[ RSS](/packages/okaspar-nova-translatable/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (18)Used By (0)

Nova Translatable Field
=======================

[](#nova-translatable-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b82a996c69b92285d351d06f4655aa6ea527333e38916ac31d0812311b4e1328/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d726d6f6e61742f6e6f76612d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mrmonat/nova-translatable)

Adds the ability to show and edit translated fields created with [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable) package.

It will show up in the detail view like this:

[![](https://camo.githubusercontent.com/be3f959a21736e249433ae4c0d3317bcc539a4f69cf97a06f3ddf48d9f3e895b/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d64657461696c732e706e67)](https://camo.githubusercontent.com/be3f959a21736e249433ae4c0d3317bcc539a4f69cf97a06f3ddf48d9f3e895b/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d64657461696c732e706e67)

And in the edit view like this:

[![](https://camo.githubusercontent.com/4c76c89e71e2de0b8922d8d075f711204d6595815fa8baaba9ecc1cab111b588/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d656469742e706e67)](https://camo.githubusercontent.com/4c76c89e71e2de0b8922d8d075f711204d6595815fa8baaba9ecc1cab111b588/68747470733a2f2f6d726d6f6e61742e64652f6769746875622f696d616765732f6e6f76612d7370617469652d7472616e736c617461626c652d656469742e706e67)

Installation and usage
----------------------

[](#installation-and-usage)

You can require this package using composer:

```
composer require okaspar/nova-translatable

```

You can add the field follows:

```
use okaspar\Translatable\Translatable;

Translatable::make('Description'),

```

Make sure, that you have your Eloquent model setup correct:

- First, you need to add the `Spatie\Translatable\HasTranslations`-trait.
- Next, you should create a public property `$translatable` which holds an array with all the names of attributes you wish to make translatable.
- Finally, you should make sure that all translatable attributes are set to the `text`-datatype in your database. If your database supports `json`-columns, use that.

Here's an example of a prepared model:

```
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class NewsItem extends Model
{
    use HasTranslations;

    public $translatable = ['name'];
}
```

### Defining Locales

[](#defining-locales)

Locales can be defined via config file `config/translatable.php` (config file can be created via [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable#installation) package) by adding a `locales` array:

```
// config/translatable.php
return [
    ...
    'locales' => [
        'en' => 'English',
        'de' => 'German',
        'fr' => 'French',
    ],
];

```

Alternatively you can "override" the config locales with the `locales(...)` method:

```
Translatable::make('Description')->locales([
    'en' => 'English',
    'de' => 'German',
]),

```

### Single Line Option

[](#single-line-option)

By default the input field on the edit view is a textarea. If you want to change it to a single line input field you can add the `singleLine()` option:

```
Translatable::make('Description')->locales([...])->singleLine(),

```

### Trix Editor

[](#trix-editor)

You can use the trix editor for your translated fields by using the `trix()` option:

```
Translatable::make('Description')->trix(),

```

### Index View

[](#index-view)

By default the locale used when displaying the field on the index view is determined by `app()->getLocale()`. To override this you can use the `indexLocale($locale)` option:

```
Translatable::make('Description')->indexLocale('de'),

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 80.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~86 days

Total

17

Last Release

2399d ago

Major Versions

1.2.1 → 2.02019-03-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/829db8ffbf186dd5601b40ddae06acd6340f0bdeb7657f6fa868a4d488ab3e4f?d=identicon)[macolson](/maintainers/macolson)

---

Top Contributors

[![mrmonat](https://avatars.githubusercontent.com/u/17597850?v=4)](https://github.com/mrmonat "mrmonat (37 commits)")[![RonMelkhior](https://avatars.githubusercontent.com/u/1017721?v=4)](https://github.com/RonMelkhior "RonMelkhior (2 commits)")[![andypa](https://avatars.githubusercontent.com/u/148700?v=4)](https://github.com/andypa "andypa (2 commits)")[![okaspar](https://avatars.githubusercontent.com/u/28530883?v=4)](https://github.com/okaspar "okaspar (1 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![vmitchell85](https://avatars.githubusercontent.com/u/1248035?v=4)](https://github.com/vmitchell85 "vmitchell85 (1 commits)")[![benjamincrozat](https://avatars.githubusercontent.com/u/3613731?v=4)](https://github.com/benjamincrozat "benjamincrozat (1 commits)")[![jimmitjoo](https://avatars.githubusercontent.com/u/5941943?v=4)](https://github.com/jimmitjoo "jimmitjoo (1 commits)")

---

Tags

laraveltranslatablenova

### Embed Badge

![Health badge](/badges/okaspar-nova-translatable/health.svg)

```
[![Health](https://phpackages.com/badges/okaspar-nova-translatable/health.svg)](https://phpackages.com/packages/okaspar-nova-translatable)
```

###  Alternatives

[optimistdigital/nova-translatable

A laravel-translatable extension for Laravel Nova.

202427.4k5](/packages/optimistdigital-nova-translatable)[outl1ne/nova-translatable

A laravel-translatable extension for Laravel Nova.

203416.9k8](/packages/outl1ne-nova-translatable)[kongulov/nova-tab-translatable

Making Nova Tab Translatable

8559.5k2](/packages/kongulov-nova-tab-translatable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
