redot/laravel-lang-extractor

A Laravel package to extract language keys from your project files and generate a language file from them.
9,750 4
Install
composer require redot/laravel-lang-extractor
Latest Version:v1.1.1
PHP:^8.1
Laravel:10 – 13
License:MIT
Last Updated:Sep 15, 2026
Links: GitHub  ·  Packagist
Maintainer: AbdelrhmanSaid

Laravel Lang Extractor

Laravel Lang Extractor is a tool to extract translation keys from blade files and generate a new language file.

Installation

Installation of this package is done through composer.

composer require --dev redot/laravel-lang-extractor

Usage

To extract translation keys from blade files and generate a new language file, run the following command:

php artisan lang:extract {language}

The extractor scans app, resources, routes, database/seeders, and public/assets for PHP and JavaScript files. It recognizes literal strings passed to __(), trans(), trans_choice(), Lang::get(), Lang::choice(), @lang, and @choice.

Single-quoted and double-quoted strings, heredocs, nowdocs, named arguments, and concatenated string literals are supported. Dynamic or interpolated keys are skipped because they cannot be resolved statically. Keys belonging to PHP language-file groups, such as validation.required, are also skipped.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
v1.1.1 ^8.1 ^10.0|^11.0|^12.0|^13.0 MIT
v1.1.0 ^8.1 ^10.0|^11.0|^12.0|^13.0 MIT
v1.0.4 ^8.1 ^10.0|^11.0|^12.0|^13.0 MIT
v1.0.3 ^8.1 ^10.0|^11.0|^12.0 MIT
v1.0.2 ^8.1 ^10.0|^11.0 MIT