Download the PHP package nativecodein/laravel-translation-scanner without Composer

On this page you can find all versions of the php package nativecodein/laravel-translation-scanner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-translation-scanner

Laravel Translation Scanner

Latest Version on Packagist Total Downloads

Laravel Translation Scanner is a zero-config Laravel package that scans your entire project — PHP, Blade, and Inertia React (JS / TS / JSX / TSX) files — and automatically appends every missing translation string to resources/lang/en.json.

Stop manually copy-pasting strings into your language files. Run one Artisan command and ship i18n-ready Laravel apps in seconds.

Works seamlessly with Laravel + Inertia.js + React, Blade, and pure PHP controllers. Supports Laravel 10, 11, 12, and 13.


Why Laravel Translation Scanner?


Installation

Install via Composer:

The service provider is auto-discovered. No further setup required.


Scan Translations

Run the scanner from your Laravel project root:

The command will:

  1. Read existing resources/lang/en.json (or create it if missing).
  2. Recursively scan your project for translatable strings.
  3. Append any missing keys with the key as the default value.
  4. Save the sorted en.json back to disk.

Auto Translate Language Files

Generate translated language JSON files automatically:

Example generated file:


Bulk Translate

Translate multiple languages in one command:

Generated:


Translation Providers

The package automatically falls back between:

If one provider fails, the next provider is used automatically.


Rate Limit Protection

Built-in API protection:

This helps reduce temporary API blocking from free translation services.


Supported Translation Patterns

PHP / Blade

Inertia React / JS / TS / JSX / TSX

Local Variable Resolution


Example Output

After running php artisan translations:scan, your resources/lang/en.json:

Console output:


Supported File Types

Extension Scans For
.php __('...'), trans('...')
.blade.php __('...'), trans('...')
.js t('...'), t(\...`),t(variable)`
.ts t('...'), t(\...`),t(variable)`
.jsx t('...'), t(\...`),t(variable)`
.tsx t('...'), t(\...`),t(variable)`

Excluded Folders

The scanner automatically skips these directories:


Supported Laravel Versions

Laravel Status
10.x Supported
11.x Supported
12.x Supported
13.x Supported

Updating

Then re-run:


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


Security

If you discover any security-related issues, please email [email protected] instead of using the public issue tracker.


Support


License

The MIT License (MIT). Please see LICENSE for more information.

Copyright © NativeCode.


Contributed by NativeCode


All versions of laravel-translation-scanner with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nativecodein/laravel-translation-scanner contains the following files

Loading the files please wait ...