PHPackages                             wowmaking/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. wowmaking/nova-translatable

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

wowmaking/nova-translatable
===========================

A laravel-translatable extension for Laravel Nova.

04PHP

Since Jul 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/wowmaking/nova-translatable)[ Packagist](https://packagist.org/packages/wowmaking/nova-translatable)[ RSS](/packages/wowmaking-nova-translatable/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#nova-translatable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bb99225cf676c9466b6bb1237816b10ec7a0ca1f88ce0b6c6974559ac77a64d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7074696d6973746469676974616c2f6e6f76612d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/optimistdigital/nova-translatable)[![Total Downloads](https://camo.githubusercontent.com/99b6d736d4f4190e043e35c8d38d0df7f4a8ff4a5aa84d2cc35d23c50512bf06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7074696d6973746469676974616c2f6e6f76612d7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/optimistdigital/nova-translatable)

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

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

[](#requirements)

- `laravel/nova: ^2.9 || ^3.0`
- `spatie/laravel-translatable: ^4.0 || ^5.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/optimistdigital/nova-settings) package

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

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

- `Image` and `File`
    - Workarounds:
        - [optimistdigital/nova-media-field](https://github.com/optimistdigital/nova-media-field)
        - 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`
    - `displayUsing` (might be fixed eventually)

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 optimistdigital/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 OptimistDigital\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.

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

14

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40887845?v=4)[alexyermalovich](/maintainers/alexyermalovich)[@alexyermalovich](https://github.com/alexyermalovich)

---

Top Contributors

[![alexyermalovich](https://avatars.githubusercontent.com/u/40887845?v=4)](https://github.com/alexyermalovich "alexyermalovich (1 commits)")

### Embed Badge

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

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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