PHPackages                             juniora/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. [Localization &amp; i18n](/categories/localization)
4. /
5. juniora/nova-translatable

ActiveLibrary[Localization &amp; i18n](/categories/localization)

juniora/nova-translatable
=========================

A laravel-translatable extension for Laravel Nova.

2.3.1(1y ago)1283MITPHPPHP &gt;=8.0

Since Sep 9Pushed 1y agoCompare

[ Source](https://github.com/JunioraTeam/nova-translatable)[ Packagist](https://packagist.org/packages/juniora/nova-translatable)[ RSS](/packages/juniora-nova-translatable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Nova Translatable
=================

[](#nova-translatable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a2e741fc3e29707bc579a8548758bcde1a2dad203ef5871f1fa40a7e43ecef08/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a756e696f72612f6e6f76612d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juniora/nova-translatable)[![Total Downloads](https://camo.githubusercontent.com/c5c419e80d20f57ebdc5903049fc55d47a2669c19537749ac91573e99ecf5862/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756e696f72612f6e6f76612d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/juniora/nova-translatable)

This [Laravel Nova](https://nova.laravel.com) allows you to make any input field `spatie/laravel-translatable` compatible and localisable.

Requirements
------------

[](#requirements)

- `PHP: ^8.0`
- `laravel/nova: ^4.12`
- `spatie/laravel-translatable: ^4.0 || ^5.0 || ^6.0`

Features
--------

[](#features)

- **Supports almost all fields** (including third party ones)
- **Supports default validation automatically**
- **Simple to implement** with minimal code changes (after `spatie/laravel-translatable` support)
- Locale tabs to switch between different locale values of the same field
- **Double click** on a tab to switch all fields to that locale
- Supports [nova-settings](https://github.com/outl1ne/nova-settings) package

Known non-working fields
------------------------

[](#known-non-working-fields)

- `Image` and `File`
    - Workarounds:
        - [outl1ne/nova-media-hub](https://github.com/outl1ne/nova-media-hub)
        - or any library that uploads images/files using XHR

Limitations
-----------

[](#limitations)

- The following methods can not be used, as this package uses them internally:
    - `resolveUsing`
    - `fillUsing`

Screenshots
-----------

[](#screenshots)

[![Detail View](./docs/detail.png)](./docs/detail.png)[![Form View](./docs/form.png)](./docs/form.png)[![Form View w/ Validation Errors](./docs/validation.png)](./docs/validation.png)

Installation
------------

[](#installation)

Firstly, set up [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable).

Install the package in a Laravel Nova project via Composer:

```
# Install nova-translatable
composer require juniora/nova-translatable

# Publish configuration (optional, but useful for setting default locales)
php artisan vendor:publish --tag="nova-translatable-config"
```

Usage
-----

[](#usage)

Call `->translatable()` on any field, like so:

```
// Any Nova field
Text::make('Name')
  ->rules('required', 'min:2')
  ->translatable(),

// Any third-party input field
Multiselect::make('Football teams')
  ->rules('required')
  ->translatable(),

// Optionally pass custom locales on a per-field basis
Number::make('Population')
  ->translatable([
    'en' => 'English',
    'et' => 'Estonian',
  ]),
```

Validation
----------

[](#validation)

It's possible to define locale specific validation rules.

To do so, add the `->rulesFor()` on your field and the `HandlesTranslatable` trait to your Nova resource.

`->rulesFor` accepts `array|string|callable` locales and `array|callable` rules.

```
use Outl1ne\NovaTranslatable\HandlesTranslatable;

class Product extends Resource
{
    use HandlesTranslatable;

    public function fields(Request $request)
    {
        return [
            Text::make(__('Name'), 'name')
                ->sortable()
                ->translatable()
                ->rules(['max:255'])
                ->rulesFor('en', [
                    'required',
                ])
                ->rulesFor(['en', 'et'], function ($locale) {
                    return ["unique:products,name->$locale{{resourceId}}"];
                }),
        ];
    }
}
```

#### In this example, rules will be added to the following values

[](#in-this-example-rules-will-be-added-to-the-following-values)

```
max: name.*
required: name.en
unique: name.en & name.et
```

Configuration
-------------

[](#configuration)

You can define default locales for all the `translatable` fields in the config file. The config file can be published using:

```
php artisan vendor:publish --tag="nova-translatable-config"
```

### Fill other locales from config option

[](#fill-other-locales-from-config-option)

The configuration option `fill_other_locales_from` allows you to pre-fill other locales from just one locale. This requires the resources to also have the `HandlesTranslatable` trait.

### One select for all fields on a page

[](#one-select-for-all-fields-on-a-page)

If you don't want to display the locale select next to each field, you can set the `display_type` to `none` and add a `Outl1ne\NovaTranslatable\Fields\LocaleSelect` field to your Nova resource. This will render a single select for all fields.

Edge cases
----------

[](#edge-cases)

#### BelongsToMany allowDuplicateRelations corner-case

[](#belongstomany-allowduplicaterelations-corner-case)

When using this field inside a BelongsToMany as a pivot field with `->allowDuplicateRelations()` and you want to filter out exact matches using the `NotExactlyAttached` rule, use the `BelongsToManyTranslatable` field instead of the regular `BelongsToMany`.

Credits
-------

[](#credits)

- [Tarvo Reinpalu](https://github.com/Tarpsvo)

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.7% 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

Unknown

Total

1

Last Release

615d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9c0c38d50cc76c71c5d48021e1358a1ea0f4f12e60d74113a5f58687cfecab8?d=identicon)[ntrolly79](/maintainers/ntrolly79)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (283 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![KasparRosin](https://avatars.githubusercontent.com/u/33309407?v=4)](https://github.com/KasparRosin "KasparRosin (12 commits)")[![RobertoNegro](https://avatars.githubusercontent.com/u/28984898?v=4)](https://github.com/RobertoNegro "RobertoNegro (4 commits)")[![robertmarney](https://avatars.githubusercontent.com/u/48888686?v=4)](https://github.com/robertmarney "robertmarney (3 commits)")[![ngiraud](https://avatars.githubusercontent.com/u/12152071?v=4)](https://github.com/ngiraud "ngiraud (3 commits)")[![milewski](https://avatars.githubusercontent.com/u/2874967?v=4)](https://github.com/milewski "milewski (3 commits)")[![umimehar](https://avatars.githubusercontent.com/u/11488033?v=4)](https://github.com/umimehar "umimehar (3 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (2 commits)")[![nimah79](https://avatars.githubusercontent.com/u/20343056?v=4)](https://github.com/nimah79 "nimah79 (2 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (2 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![srinathreddydudi](https://avatars.githubusercontent.com/u/10626045?v=4)](https://github.com/srinathreddydudi "srinathreddydudi (1 commits)")[![stepanenko3](https://avatars.githubusercontent.com/u/31134245?v=4)](https://github.com/stepanenko3 "stepanenko3 (1 commits)")[![Gertiozuni](https://avatars.githubusercontent.com/u/26062255?v=4)](https://github.com/Gertiozuni "Gertiozuni (1 commits)")[![xcalder](https://avatars.githubusercontent.com/u/6959235?v=4)](https://github.com/xcalder "xcalder (1 commits)")[![farrrr](https://avatars.githubusercontent.com/u/1716558?v=4)](https://github.com/farrrr "farrrr (1 commits)")[![voidgraphics](https://avatars.githubusercontent.com/u/9298484?v=4)](https://github.com/voidgraphics "voidgraphics (1 commits)")[![webstack9](https://avatars.githubusercontent.com/u/58256527?v=4)](https://github.com/webstack9 "webstack9 (1 commits)")[![mikepluquin](https://avatars.githubusercontent.com/u/38099131?v=4)](https://github.com/mikepluquin "mikepluquin (1 commits)")

---

Tags

laraveli18ntranslatetranslatablenova

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/juniora-nova-translatable/health.svg)](https://phpackages.com/packages/juniora-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)[spatie/nova-translatable

Making Nova fields translatable

2231.5M1](/packages/spatie-nova-translatable)[badinansoft/nova-language-switch

A Laravel Nova package to switch language in your application

26506.4k1](/packages/badinansoft-nova-language-switch)[statikbe/laravel-nova-chained-translation-manager

The Laravel Nova Chained Translation Manager allows you to easily edit and customise the translations of your current Laravel environment.

1628.6k](/packages/statikbe-laravel-nova-chained-translation-manager)

PHPackages © 2026

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