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

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

ngiraud/nova-translatable-v2
============================

A laravel-translatable extension for Laravel Nova. Inspired by optimistdigital/nova-translatable

2.0.0(3y ago)519.8k3[1 PRs](https://github.com/ngiraud/nova-translatable-v2/pulls)MITPHPPHP ^8.0

Since Feb 4Pushed 3y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (2)Versions (11)Used By (0)

Nova Translatable V2
====================

[](#nova-translatable-v2)

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

This package is inspired by [optimistdigital/nova-translatable](https://github.com/optimistdigital/nova-translatable).

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

[](#requirements)

- `laravel/nova: ^3.0`
- `spatie/laravel-translatable: ^4.0`

You first need to set up the [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable) package.

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

[](#installation)

The package can be installed via composer:

```
composer require ngiraud/nova-translatable-v2
```

The package will automatically register the service provider.

You can publish the config file in order to use custom locales.

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

This is the contents of the published config file:

```
return [

    /**
     * the locales which the `translatable` wrapper will use by default.
     *
     * can be a:
     *  - keyed array (['en' => 'english])
     *  - callable that returns a keyed array
     */

    'locales' => ['en' => 'English'],

];
```

Usage
-----

[](#usage)

Simply call `->translatable()` on a Nova field:

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

Optionally you can pass custom locales:

```
Number::make('Population')
  ->translatable([
    'en' => 'English',
    'et' => 'Estonian',
  ])
```

Validation
----------

[](#validation)

You can add validation rules for a single locale.

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

```
class Product extends Resource
{
    use \NGiraud\NovaTranslatable\HasTranslatable;

    public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),

            Text::make(__('Name'), 'name')
                ->sortable()
                ->translatable()
                ->rules(['max:255'])
                ->rulesFor('fr', [
                    'required',
                    'unique:products,sku->fr,{{resourceId}}'
                ])
    }
}
```

In this example, the rule `max` will be applied for `name.*` and the rule `required` will be applied for `name.fr`.

TODOS
-----

[](#todos)

- Adding tests to the package

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nicolas Giraud](https://github.com/ngiraud)
- [All contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

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

Every ~162 days

Recently: every ~265 days

Total

8

Last Release

1146d ago

Major Versions

1.0.6 → 2.0.02023-03-20

PHP version history (3 changes)1.0.0PHP &gt;=7.1.0

1.0.3PHP &gt;=7.2.5

2.0.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![ngiraud](https://avatars.githubusercontent.com/u/12152071?v=4)](https://github.com/ngiraud "ngiraud (11 commits)")[![martinhummer](https://avatars.githubusercontent.com/u/2011467?v=4)](https://github.com/martinhummer "martinhummer (1 commits)")

---

Tags

laraveli18ntranslatetranslatablenova

### Embed Badge

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

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

###  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)
