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

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

djstarcom/nova-astrotranslatable
================================

An Astrotomic Translatable extension for Laravel Nova.

3.2.0(6mo ago)0351MITPHPPHP &gt;=8.0

Since Jan 20Pushed 6mo agoCompare

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

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

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

[](#nova-astrotomic-translatable)

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

It is made from a fork from [Optimist Digital's](https://github.com/optimistdigital) [Laravel Nova Translatable](https://github.com/optimistdigital/nova-translatable) field, which is tailored for the Spatie Laravel Translatable package - so huge thanks to them, 99% of the work was made by them!

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

[](#requirements)

- `php: >=8.0`,
- `laravel/nova: ^5.0`
- `astrotomic/laravel-translatable: ^11.16`

Features
--------

[](#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

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

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

- `Image` and `File`

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 [astrotomic/laravel-translatable](https://github.com/astrotomic/laravel-translatable).

Install the package in a Laravel Nova project via Composer:

```
# Install nova-translatable
composer require djstarcom/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 DJStarCOM\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-translatable-config"
```

Credits
-------

[](#credits)

- [Kraenk Visuell GbR](https://github.com/kraenkvisuell)
- [Ytrade Group AB](https://github.com/yaytrade)
- [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

37

—

LowBetter than 83% of packages

Maintenance67

Regular maintenance activity

Popularity8

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.6% 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 ~508 days

Total

3

Last Release

191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e612dd8656b2f610a9bc3f6e3656290363217e48e34f6951fbadb5bd770b242?d=identicon)[StarCOM](/maintainers/StarCOM)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (142 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (12 commits)")[![chrillep](https://avatars.githubusercontent.com/u/1267931?v=4)](https://github.com/chrillep "chrillep (8 commits)")[![DJStarCOM](https://avatars.githubusercontent.com/u/1818603?v=4)](https://github.com/DJStarCOM "DJStarCOM (7 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)")[![webstack9](https://avatars.githubusercontent.com/u/58256527?v=4)](https://github.com/webstack9 "webstack9 (1 commits)")[![deepsourcebot](https://avatars.githubusercontent.com/u/60907429?v=4)](https://github.com/deepsourcebot "deepsourcebot (1 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")[![rslanzi](https://avatars.githubusercontent.com/u/7341598?v=4)](https://github.com/rslanzi "rslanzi (1 commits)")[![srinathreddydudi](https://avatars.githubusercontent.com/u/10626045?v=4)](https://github.com/srinathreddydudi "srinathreddydudi (1 commits)")[![deepsource-autofix[bot]](https://avatars.githubusercontent.com/in/57168?v=4)](https://github.com/deepsource-autofix[bot] "deepsource-autofix[bot] (1 commits)")[![voidgraphics](https://avatars.githubusercontent.com/u/9298484?v=4)](https://github.com/voidgraphics "voidgraphics (1 commits)")[![farrrr](https://avatars.githubusercontent.com/u/1716558?v=4)](https://github.com/farrrr "farrrr (1 commits)")

---

Tags

laraveli18ntranslatetranslatablenova

### Embed Badge

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

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