lenorix/fluentizy-laravel-tools

Extract all translation strings from your codebase and manage your language files effortlessly

Fund package maintenance!
jhg

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/lenorix/fluentizy-laravel-tools

v1.1.1 2025-12-03 02:26 UTC

This package is auto-updated.

Last update: 2025-12-03 10:23:02 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Extract all translation strings from your codebase and manage your language files effortlessly.

The i18n & l10n will be easier than ever with this package!

๐Ÿ›Ÿ Support us

Help us continue developing and maintaining this package by sponsoring us.

Also, using fluentizy is a great way to support the project!

๐Ÿš€ Features

  • Scan chosen directories for translation strings.
  • Supports both JSON and PHP translation files.
  • Supports __(), trans(), and @lang() functions.
  • Update language files automatically without overwriting existing translations.
  • Artisan command for easy integration into your workflow.
  • Tests running with PHP 8.0-8.5 and Laravel 9.x-12.x to ensure compatibility.

๐Ÿ“ฆ Installation

You can install the package via composer:

composer require --dev lenorix/fluentizy-laravel-tools

That's all! This is enough to get started using lang:extract command.

You can publish the config file with:

php artisan vendor:publish --tag="fluentizy-tools-config"

You can publish the translation files with:

php artisan vendor:publish --tag="fluentizy-tools-translations"

๐Ÿ“– Usage

To extract translations from your codebase, run:

php artisan lang:extract es

This command will update your translation file based on __('...') usages in your code.

If there are lang/*.json or lang/*/*.php files, to update all these files, run:

php artisan lang:extract

Behavior:

  • Strings that are already translated will not be modified.
  • If a string is missing in the translation file, it will be added with an empty value.
  • If a string exists in the translation file but is not found in the codebase, it will be removed.

๐Ÿงช Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The Unlicense License. Please see License File for more information.