PHPackages                             ibrahimamasha/autotranslator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ibrahimamasha/autotranslator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ibrahimamasha/autotranslator
============================

Automatically translate Laravel JSON files using AI or free tools.

2.1.0(11mo ago)191.6k1PHP

Since Jun 15Pushed 11mo agoCompare

[ Source](https://github.com/IbrahimAmasha/laravel-autotranslator)[ Packagist](https://packagist.org/packages/ibrahimamasha/autotranslator)[ RSS](/packages/ibrahimamasha-autotranslator/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel AutoTranslator
======================

[](#laravel-autotranslator)

**Laravel AutoTranslator** is a simple Laravel package to automate translating your language files — ideal for bilingual projects like Arabic/English.

It scans your code for translation keys, fills in missing entries in `lang/en.json`, and auto-translates them into Arabic (`lang/ar.json`) using **MyMemory** or **DeepL**.

---

Features
--------

[](#features)

- Scans Blade and PHP files for `__()` and `@lang()` keys
- Auto-generates `lang/en.json` and `lang/ar.json`
- Uses **MyMemory** by default (free, no API key)
- Fallback support for **DeepL** (requires API key, 500k characters/month free)
- Works with just two Artisan commands

---

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

[](#installation)

```
composer require ibrahimamasha/autotranslator
```

---

Configuration (Optional)
------------------------

[](#configuration-optional)

Publish the config file:

```
php artisan vendor:publish --tag=config
```

Example `config/autotranslator.php`:

```
return [
    'source' => 'en',
    'target' => 'ar',
    'driver' => 'mymemory', // default: free, no key needed

    'mymemory' => [
        'email' => env('MYMEMORY_EMAIL'),
        'key' => env('MYMEMORY_KEY'),
    ],

    'deepl' => [
        'key' => env('DEEPL_KEY'), // required if using DeepL
    ],
];
```

> MyMemory is the default driver and works without an API key.
> DeepL offers more accurate results, but requires an API key (500,000 free characters/month).

---

Usage
-----

[](#usage)

### 1. Create translation files

[](#1-create-translation-files)

```
php artisan translate:setup
```

### 2. Scan and translate

[](#2-scan-and-translate)

```
php artisan translate:scan
```

---

Example
-------

[](#example)

For this code:

```
__('Dashboard')
@lang('No messages yet')
```

The package generates:

```
{
  "Dashboard": "Dashboard",
  "No messages yet": "No messages yet"
}
```

```
{
  "Dashboard": "لوحة التحكم",
  "No messages yet": "لا توجد رسائل بعد"
}
```

---

Author
------

[](#author)

**Ibrahim Amasha**
[LinkedIn](https://www.linkedin.com/in/ibrahim-amasha-24199a230)
[GitLab](https://gitlab.com/ibrahimamasha7)

---

License
-------

[](#license)

MIT License

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance50

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

3

Last Release

356d ago

Major Versions

1.0.0 → 2.0.02025-06-28

### Community

Maintainers

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

---

Top Contributors

[![IbrahimAmasha](https://avatars.githubusercontent.com/u/113477850?v=4)](https://github.com/IbrahimAmasha "IbrahimAmasha (32 commits)")

### Embed Badge

![Health badge](/badges/ibrahimamasha-autotranslator/health.svg)

```
[![Health](https://phpackages.com/badges/ibrahimamasha-autotranslator/health.svg)](https://phpackages.com/packages/ibrahimamasha-autotranslator)
```

###  Alternatives

[egroupware/egroupware

EGroupware extends a classic groupware with an integrated CRM-system, a secure file-server and Collabora Online Office.

2921.6k](/packages/egroupware-egroupware)[robole/sulu-ai-translator-bundle

Translate any type of content using DeepL

181.7k](/packages/robole-sulu-ai-translator-bundle)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

2913.9k](/packages/mage-os-module-automatic-translation)[jumper423/yii2-captcha

Распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

172.6k2](/packages/jumper423-yii2-captcha)[mominalzaraa/filament-localization

The first and only automatic Filament localization package with intelligent resource scanning, structured translation files, and comprehensive testing

101.6k](/packages/mominalzaraa-filament-localization)

PHPackages © 2026

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