Looking to hire Laravel developers? Try LaraJobs

laravel-auto-lang maintained by nativecode

Description
Auto append missing Laravel translations to en.json
Last update
2026/05/19 16:17 (dev-main)
License
Links
Downloads
4

Comments
comments powered by Disqus

Laravel Auto Lang

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

Features

  • Scan __() translations
  • Scan trans() translations
  • Automatically generate lang/en.json
  • Supports Laravel 10, 11, and 12
  • Simple Artisan command

Installation

composer require nativecode/laravel-auto-lang

Usage

Run the scan command:

php artisan auto-lang:scan

Example

Blade:

{{ __('Dashboard') }}

{{ trans('Profile') }}

Controller:

return __('Welcome Back');

Generated:

{
  "Dashboard": "Dashboard",
  "Profile": "Profile",
  "Welcome Back": "Welcome Back"
}

Scanned Locations

The package scans:

app/
resources/views/

Supported Laravel Versions

Laravel Version Supported
10.x Yes
11.x Yes
12.x Yes

Update Package

composer update nativecode/laravel-auto-lang

License

MIT