PHPackages                             sharpapi/nova-ai-translator - 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. sharpapi/nova-ai-translator

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

sharpapi/nova-ai-translator
===========================

v1.0.5(2mo ago)42.2k↑35.7%MITPHPPHP ^8.1CI passing

Since Nov 10Pushed 2mo agoCompare

[ Source](https://github.com/sharpapi/nova-ai-translator)[ Packagist](https://packagist.org/packages/sharpapi/nova-ai-translator)[ Docs](https://github.com/sharpapi/nova-ai-translator)[ RSS](/packages/sharpapi-nova-ai-translator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (7)Used By (0)

SharpAPI AI Translator for Laravel Nova
=======================================

[](#sharpapi-ai-translator-for-laravel-nova)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c0c9170013305aefcc38fb402f853d1fd065b68e229762e2ae7ac6860632dd75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686172706170692f6e6f76612d61692d7472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/nova-ai-translator)[![Total Downloads](https://camo.githubusercontent.com/4b66be7e4c09c9d8712bd8e6e93d0144e6bf625901dec0086040d7bea3e327b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686172706170692f6e6f76612d61692d7472616e736c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/nova-ai-translator)

Welcome to **SharpAPI AI Translator for Laravel Nova** – the package that’s here to make your content translation smoother and smarter with the power of SharpAPI's [Advanced Text Translator AI API](https://sharpapi.com/en/catalog/ai/content-marketing-automation/advanced-text-translator) and to leverage [AI for Laravel](https://SharpAPI.com/). This package extends the already-awesome [Spatie's `laravel-translatable`](https://spatie.be/docs/laravel-translatable/) with a Nova action you can trigger from your resource’s edit or list views.

`🤖 Initiate AI Translation` can be run from either:

- **The Nova resources list view:**

    > [![](images/form-open-list.png "Form Open From the List")](images/form-open-list.png)
- **Or from the edit screen of an individual resource:**

    > [![](images/form-open.png "Form Open Menu")](images/form-open.png)

Here's the form you’ll use to dispatch the translation:

> [![](images/form.png "Form PopUp")](images/form.png)

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

[](#requirements)

- **Laravel**: ^10.48.29+
- **Laravel Nova**: 4.0+
- **PHP**: 8.1+
- **spatie/laravel-translatable**: used for detecting translatable fields

Installation &amp; Configuration
--------------------------------

[](#installation--configuration)

### 1. Install the package via Composer

[](#1-install-the-package-via-composer)

```
composer require sharpapi/nova-ai-translator
```

### 2. API Key Configuration

[](#2-api-key-configuration)

You’ll need an API key from [SharpAPI.com](https://SharpAPI.com/). Add it to your `.env` file like so:

```
SHARP_API_KEY=your-sharp-api-key

```

### 3. Supported Locales Configuration

[](#3-supported-locales-configuration)

Add your supported locales in `config/app.php` under the `locales` key:

```
return [
   'locales' => [
       'en' => 'English',
       'es' => 'Spanish',
       'fr' => 'French',
       // Add other supported languages here
   ],
];
```

### 4. Add to Nova Resource Models

[](#4-add-to-nova-resource-models)

For any model you want to translate, make sure it:

- Uses Spatie’s `HasTranslations` trait.
- Specifies which attributes are `translatable`.
- **\[OPTIONAL\], yet Highly Recommended**: Use `Actionable` and `Notifiable` traits to track actions and notifications. This ensures you can log and monitor translation progress effectively.

Example:

```
namespace App;

use Laravel\Nova\Actions\Actionable;
use Illuminate\Notifications\Notifiable;
use Spatie\Translatable\HasTranslations;

class BlogPost
{
   use Actionable, Notifiable, HasTranslations;

   protected $translatable = ['title', 'subtitle', 'content'];
}
```

### 5. Attach the Action in a Nova Resource

[](#5-attach-the-action-in-a-nova-resource)

Add the `TranslateModel` action to any Nova resource, such as `BlogPost`:

```
use SharpAPI\NovaAiTranslator\Actions\TranslateModel;

public function actions()
{
   return [
       (new TranslateModel())->enabled(),
   ];
}
```

### 6. Queue Setup

[](#6-queue-setup)

The `TranslateModel` action runs as a queued job, which is essential for smooth, asynchronous processing. Make sure your app’s queue is up and running for best results.

Using the TranslateModel Action
-------------------------------

[](#using-the-translatemodel-action)

- From the resource’s edit screen, trigger the `TranslateModel` action.
- A form will pop up where you can select the source and target languages and choose an optional tone.
- **Note**: The action checks if all target language fields already contain content. If they do, you’ll be prompted to clear these fields first if you want a fresh AI-generated translation.
- Once triggered, the action queues the job, and you can monitor its progress if your model uses the `Actionable` and `Notifiable` traits.

### Tips

[](#tips)

- **Translation logs**: Helpful for tracking what was translated.

    > [![](images/actions-log.png)](images/actions-log.png)
- **Error handling**: With `Laravel\Nova\Actions\Actionable`, you get detailed logs if something goes awry.

    > [![](images/actions-log-error.png)](images/actions-log-error.png)

Changelog
---------

[](#changelog)

See [CHANGELOG](CHANGELOG.md) for recent updates.

Credits
-------

[](#credits)

- [A2Z WEB LTD](https://github.com/a2zwebltd)
- [Dawid Makowski](https://github.com/makowskid)
- Powered by [SharpAPI](https://sharpapi.com/) – your go-to for leveling up with [AI in Laravel](https://sharpapi.com/en/tag/laravel).

License
-------

[](#license)

Licensed under the MIT License – see the [License File](LICENSE.md) for details.

Follow SharpAPI for More!
-------------------------

[](#follow-sharpapi-for-more)

Stay tuned for updates, tips, and tricks:

- [SharpAPI X (formerly Twitter)](https://x.com/SharpAPI)
- [SharpAPI YouTube](https://www.youtube.com/@SharpAPI)
- [SharpAPI Vimeo](https://vimeo.com/SharpAPI)
- [SharpAPI LinkedIn](https://www.linkedin.com/products/a2z-web-ltd-sharpapicom-automate-with-aipowered-api/)
- [SharpAPI Facebook](https://www.facebook.com/profile.php?id=61554115896974)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~94 days

Total

6

Last Release

84d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v1.0.3PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b500dd3d9b470b50b1ed911cd24a6fdcce51dd97dceb4f97879f727a14495a8?d=identicon)[dawid-makowski](/maintainers/dawid-makowski)

---

Top Contributors

[![makowskid](https://avatars.githubusercontent.com/u/6271194?v=4)](https://github.com/makowskid "makowskid (13 commits)")

---

Tags

aicomposer-packagelaravellaravel-packagenovanova-extensionnova-packpackagetranslationlaravelnovaSharpAPIlaravel-novaautomatic translationspatie-translatableai translation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sharpapi-nova-ai-translator/health.svg)

```
[![Health](https://phpackages.com/badges/sharpapi-nova-ai-translator/health.svg)](https://phpackages.com/packages/sharpapi-nova-ai-translator)
```

###  Alternatives

[spatie/nova-translatable

Making Nova fields translatable

2231.5M1](/packages/spatie-nova-translatable)[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)[outl1ne/nova-translations-loader

This Laravel Nova package helps developers load translations into their packages.

395.1M42](/packages/outl1ne-nova-translations-loader)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[optimistdigital/nova-locale-manager

Laravel Nova tool to manage locales.

167.0k](/packages/optimistdigital-nova-locale-manager)

PHPackages © 2026

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