PHPackages                             kiritokatklian/nova-astrotranslatable - 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. kiritokatklian/nova-astrotranslatable

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

kiritokatklian/nova-astrotranslatable
=====================================

An astrotomic/laravel-translatable extension for Laravel Nova.

5.0.2(3mo ago)23.0k↓50%4MITPHPPHP &gt;=8.2

Since Oct 9Pushed 3mo agoCompare

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

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Nova Astrotomic Translatable
============================

[](#nova-astrotomic-translatable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8b168d1ef48046a0faa3bae69bf1595fc8dcc813df1daba2949f05b55e5dea52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b697269746f6b61746b6c69616e2f6e6f76612d617374726f7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kiritokatklian/nova-astrotranslatable)[![Total Downloads](https://camo.githubusercontent.com/31c5dd9b032cc09a86a01354b5df144583c2c8b3706863a7cf43a780aba325bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b697269746f6b61746b6c69616e2f6e6f76612d617374726f7472616e736c617461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kiritokatklian/nova-astrotranslatable)

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

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

[](#requirements)

- `PHP: >=8.2`
- `laravel/nova: ^5.0`
- `astrotomic/laravel-translatable: ^11.10`

Version Compatibility
---------------------

[](#version-compatibility)

With the release of Nova 5.0, there are now two separate versions of Nova Translatable. Unfortunately due to the nature of the update, the new one isn't backwards compatible. So please choose your version accordingly.

Laravel NovaNova Translatable4.02.15.05.0Features
--------

[](#features)

- **Supports almost all fields** (including third party ones)
- **Supports default validation automatically**
- **Simple to implement** with minimal code changes (after `astrotomic/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)

 Form View [![Detail view](./docs/detail.png)](./docs/detail.png) Form View [![Form view](./docs/form.png)](./docs/form.png) Form View w/ Validation Errors [![Form view with validation errors](./docs/validation.png)](./docs/validation.png)Installation
------------

[](#installation)

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

Install the package in a Laravel Nova project via Composer:

```
# Install nova-astrotranslatable
composer require kiritokatklian/nova-astrotranslatable

# 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 Kiritokatklian\NovaAstrotranslatable\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-astrotranslatable-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 `Kiritokatklian\NovaAstrotranslatable\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)
- [Optimist Digital](https://github.com/optimistdigital)

License
-------

[](#license)

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

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 85.8% 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 ~407 days

Total

4

Last Release

96d ago

Major Versions

2.1.0 → 5.0.02025-02-16

PHP version history (2 changes)2.1.0PHP &gt;=8.0

5.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b39f6e928a36e5e42a38ee97960f6b1d34b18b990d314d81b784d8276d81692?d=identicon)[kiritokatklian](/maintainers/kiritokatklian)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (242 commits)")[![kiritokatklian](https://avatars.githubusercontent.com/u/6556281?v=4)](https://github.com/kiritokatklian "kiritokatklian (12 commits)")[![KasparRosin](https://avatars.githubusercontent.com/u/33309407?v=4)](https://github.com/KasparRosin "KasparRosin (7 commits)")[![umimehar](https://avatars.githubusercontent.com/u/11488033?v=4)](https://github.com/umimehar "umimehar (3 commits)")[![milewski](https://avatars.githubusercontent.com/u/2874967?v=4)](https://github.com/milewski "milewski (3 commits)")[![ngiraud](https://avatars.githubusercontent.com/u/12152071?v=4)](https://github.com/ngiraud "ngiraud (3 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (2 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (2 commits)")[![xcalder](https://avatars.githubusercontent.com/u/6959235?v=4)](https://github.com/xcalder "xcalder (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![farrrr](https://avatars.githubusercontent.com/u/1716558?v=4)](https://github.com/farrrr "farrrr (1 commits)")[![mikepluquin](https://avatars.githubusercontent.com/u/38099131?v=4)](https://github.com/mikepluquin "mikepluquin (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)")[![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)")

---

Tags

laraveli18ntranslatetranslatablenovaastrotomic

### Embed Badge

![Health badge](/badges/kiritokatklian-nova-astrotranslatable/health.svg)

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

###  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)[badinansoft/nova-language-switch

A Laravel Nova package to switch language in your application

26506.4k1](/packages/badinansoft-nova-language-switch)[cactus-galaxy/filament-astrotomic

Filament support for Astrotomic's Laravel Translatable package.

2516.3k](/packages/cactus-galaxy-filament-astrotomic)[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)
