PHPackages                             victormgomes/auto-translate - 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. victormgomes/auto-translate

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

victormgomes/auto-translate
===========================

Automatic translation for translatable attributes in Eloquent models

1.0.0(2w ago)2124↓16.7%MITPHPPHP ^8.4CI passing

Since Apr 26Pushed 2w agoCompare

[ Source](https://github.com/VictorMGomes/auto-translate)[ Packagist](https://packagist.org/packages/victormgomes/auto-translate)[ Docs](https://github.com/victormgomes/auto-translate)[ GitHub Sponsors](https://github.com/sponsors/VictorMGomes)[ RSS](/packages/victormgomes-auto-translate/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (20)Versions (8)Used By (0)

Auto Translate
==============

[](#auto-translate)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cf13e6a222ddb295ad719f29706c89a7ef22338f5a38bd4f6610f33bfaf444e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766963746f726d676f6d65732f6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/victormgomes/auto-translate)[![GitHub Tests Action Status](https://camo.githubusercontent.com/db4300f1789152de2b7da0c2859a075c3994bb933f801730a210c20fed2240a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f766963746f726d676f6d65732f6175746f2d7472616e736c6174652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/victormgomes/auto-translate/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3effc01b4ead7c46d0a3cc82b971bb274ff2ddc132ef304f4447ad3087fb47f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f766963746f726d676f6d65732f6175746f2d7472616e736c6174652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/victormgomes/auto-translate/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/56accdb2d52e9ff6e192f2b0ac648ea12c3b1b5674ce355dec8c5786c1d6ffee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766963746f726d676f6d65732f6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/victormgomes/auto-translate)[![License](https://camo.githubusercontent.com/ab471e88d8d50835bccd90442c4f96087c8ae38aacb67dd252a78132eab780df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f766963746f726d676f6d65732f6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/victormgomes/auto-translate)

**Automatic translation for translatable attributes in Eloquent models**

---

Introduction
------------

[](#introduction)

**Auto Translate** is a powerful addon for `spatie/laravel-translatable` that automates the translation of your model attributes. It listens for model saving events and automatically translates your content into multiple languages using configured translation providers.

### Why use this package?

[](#why-use-this-package)

- **Automation**: Save time by letting the package handle translations automatically upon saving models.
- **Seamless Integration**: Built specifically to work with the industry-standard `spatie/laravel-translatable`.
- **Declarative Configuration**: Use PHP attributes to define which fields should be translated, keeping your models clean and readable.
- **Scalable**: Easily manage multi-language content across your entire application without manual intervention.

---

Support us
----------

[](#support-us)

We invest a lot of resources into creating [best in class open source packages](https://github.com/victormgomes). You can support us by [sponsoring us on GitHub](https://github.com/sponsors/VictorMGomes).

---

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

[](#installation)

You can install the package via composer:

```
composer require victormgomes/auto-translate
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="auto-translate-migrations"
php artisan migrate
```

---

Usage
-----

[](#usage)

Simply use the `AutoTranslatable` trait and the `#[AutoTranslate]` attribute on your models. Specify which fields should be automatically translated.

```
use Victormgomes\AutoTranslate\Concerns\AutoTranslatable;
use Victormgomes\AutoTranslate\AutoTranslate;
use Spatie\Translatable\HasTranslations;

#[AutoTranslate(fields: ['name'])]
class Category extends Model
{
    use AutoTranslatable, HasTranslations;

    public $translatable = ['name'];
}
```

When you save the `Category` model, the `name` attribute will be automatically translated into all supported locales defined in your configuration.

---

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Victor M. Gomes](https://github.com/VictorMGomes)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance97

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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 ~6 days

Total

6

Last Release

15d ago

Major Versions

0.0.5 → 1.0.02026-05-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20375480?v=4)[Victor M. Gomes](/maintainers/victormgomes)[@VictorMGomes](https://github.com/VictorMGomes)

---

Top Contributors

[![VictorMGomes](https://avatars.githubusercontent.com/u/20375480?v=4)](https://github.com/VictorMGomes "VictorMGomes (29 commits)")

---

Tags

laravelauto-translateVictor M. Gomes

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/victormgomes-auto-translate/health.svg)

```
[![Health](https://phpackages.com/badges/victormgomes-auto-translate/health.svg)](https://phpackages.com/packages/victormgomes-auto-translate)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k53.0M578](/packages/laravel-scout)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M120](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

87311.3M149](/packages/spatie-laravel-health)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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