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

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

xdarko/laravel-auto-translate
=============================

laravel auto translate for models and langs

0.1.2(1y ago)040[4 PRs](https://github.com/hubo502/laravel-auto-translate/pulls)1MITPHPPHP ^8.2CI passing

Since Jul 11Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/hubo502/laravel-auto-translate)[ Packagist](https://packagist.org/packages/xdarko/laravel-auto-translate)[ Docs](https://github.com/hubo502/laravel-auto-translate)[ GitHub Sponsors](https://github.com/Darko)[ RSS](/packages/xdarko-laravel-auto-translate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (16)Versions (7)Used By (1)

laravel auto translate
======================

[](#laravel-auto-translate)

用于自动翻译数据

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

[](#installation)

You can install the package via composer:

```
composer require xdarko/laravel-auto-translate
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="laravel-auto-translate-migrations"
php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-auto-translate-config"
```

This is the contents of the published config file:

```
return [
    'test_mode' => false,//just for test.(won't query translate api,just fake translation)
    'log' => 'default',//log channel
    'base_locale' => 'en',
    'trans_locales' => ['fr', 'es', 'ja', 'it', 'pt'],
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-auto-translate-views"
```

Usage
-----

[](#usage)

```
use Darko\AutoTranslate\Contracts\Models\AutoTranslatable;
use Darko\AutoTranslate\Models\Traits\HasAutoTranslate;
use Illuminate\Database\Eloquent\Model;

class AutoTranslateModel extends Model implements AutoTranslatable{
    use HasAutoTranslatable;

    public $translatable = ['title', 'content', 'blocks', 'desc'];//fields can be translated
    public $json_translatable = ['title', 'description'];//fields in json keys can be translated

}
```

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)

- [Boris Hu](https://github.com/hubo502)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance66

Regular maintenance activity

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.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 ~28 days

Total

2

Last Release

642d ago

### Community

Maintainers

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

---

Top Contributors

[![hubo502](https://avatars.githubusercontent.com/u/5745097?v=4)](https://github.com/hubo502 "hubo502 (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravellocalizationtranslatelaravel-auto-translate

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[statikbe/laravel-filament-chained-translation-manager

A translation manager tool for Laravel Filament, that makes use of the Laravel Chained Translator.

92108.7k](/packages/statikbe-laravel-filament-chained-translation-manager)[elegantly/laravel-translator

All on one translations management for Laravel

6216.9k](/packages/elegantly-laravel-translator)[andrewdwallo/transmatic

Automate and streamline real-time text translations in your Laravel applications

5511.6k](/packages/andrewdwallo-transmatic)[smousss/laravel-globalize

Make Laravel projects translatable in a matter of seconds!

2266.3k](/packages/smousss-laravel-globalize)

PHPackages © 2026

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