PHPackages                             nativecode/laravel-auto-lang - 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. nativecode/laravel-auto-lang

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

nativecode/laravel-auto-lang
============================

Auto append missing Laravel translations to en.json

2.0.2(2w ago)051MITPHPPHP ^8.2

Since May 19Pushed 2w agoCompare

[ Source](https://github.com/iamsurendhar/laravel-auto-lang)[ Packagist](https://packagist.org/packages/nativecode/laravel-auto-lang)[ RSS](/packages/nativecode-laravel-auto-lang/feed)WikiDiscussions main Synced 1w ago

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

Laravel Auto Lang
=================

[](#laravel-auto-lang)

Automatically scan Laravel translation strings and append missing translations to `resources/lang/en.json`.

Features
--------

[](#features)

- Scan `__()` translations in PHP and Blade files
- Scan `trans()` translations in PHP/controllers
- Scan `t()` translations in JS/TS/JSX/TSX
- Supports local variable translation detection
- Auto generate other language JSON files
- Multiple translation provider fallback
- Prevent API rate limits automatically
- Recursive project scanning
- Smart folder exclusions
- Supports Laravel 10, 11, 12, and 13

---

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

[](#installation)

```
composer require nativecode/laravel-auto-lang
```

---

Scan Translations
=================

[](#scan-translations)

Run the scan command:

```
php artisan auto-lang:scan
```

---

PHP / Blade Example
-------------------

[](#php--blade-example)

```
{{ __('Dashboard') }}

{{ __('Plugins') }}

return trans('Welcome Back');
```

---

React / TSX Example
-------------------

[](#react--tsx-example)

```
t('Login')

t("Register")

t(`Dashboard`)
```

---

Local Variable Example
----------------------

[](#local-variable-example)

```
const title = 'Settings';

t(title)
```

Generated:

```
{
    "Dashboard": "Dashboard",
    "Plugins": "Plugins",
    "Welcome Back": "Welcome Back",
    "Login": "Login",
    "Register": "Register",
    "Settings": "Settings"
}
```

---

Auto Translate JSON Files
=========================

[](#auto-translate-json-files)

Generate another language JSON automatically:

```
php artisan auto-lang:translate ta
```

---

Bulk Translate
--------------

[](#bulk-translate)

```
php artisan auto-lang:translate ta ar ro
```

Generated:

```
resources/lang/ta.json
resources/lang/ar.json
resources/lang/ro.json
```

---

Translation Providers
---------------------

[](#translation-providers)

Automatic fallback providers:

```
Google Translate
LibreTranslate
Lingva Translate
```

---

Rate Limit Protection
---------------------

[](#rate-limit-protection)

Automatic delay protection included:

```
usleep(300000)
```

to reduce API blocking risks.

---

Supported File Types
--------------------

[](#supported-file-types)

```
.php
.blade.php
.js
.ts
.jsx
.tsx
```

---

Excluded Folders
----------------

[](#excluded-folders)

```
bootstrap/
config/
database/
routes/
storage/
tests/
vendor/
```

---

Supported Laravel Versions
--------------------------

[](#supported-laravel-versions)

Laravel VersionSupported10.xYes11.xYes12.xYes13.xYes---

Update Package
--------------

[](#update-package)

```
composer update nativecode/laravel-auto-lang
```

---

Run Scan Again
--------------

[](#run-scan-again)

```
php artisan auto-lang:scan
```

---

Translate Language Files
------------------------

[](#translate-language-files)

```
php artisan auto-lang:translate ta ar ro
```

---

Example Output
--------------

[](#example-output)

```
Added: Dashboard
Added: Plugins
Added: Welcome Back
Added: Login
Added: Settings
Translation scan completed.
```

---

License
-------

[](#license)

MIT

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance96

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Total

19

Last Release

20d ago

Major Versions

1.9.0 → 2.0.02026-05-20

PHP version history (2 changes)1.0.0PHP ^8.1

1.1.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cdfdcf531ffd9b8146d5afb55bb74db554d95dd8994a0e38fc2ab03950583bc?d=identicon)[iamsurendhar](/maintainers/iamsurendhar)

---

Top Contributors

[![iamsurendhar](https://avatars.githubusercontent.com/u/178882523?v=4)](https://github.com/iamsurendhar "iamsurendhar (20 commits)")

### Embed Badge

![Health badge](/badges/nativecode-laravel-auto-lang/health.svg)

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

###  Alternatives

[illuminate/translation

The Illuminate Translation package.

6937.4M554](/packages/illuminate-translation)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4721.5k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

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