syntafin/laravel-i18n-exporter

This package provides a command to easily convert the Laravel language files into JSON to be used by your frontend application.

v1.0.2 2025-05-11 19:43 UTC

This package is auto-updated.

Last update: 2025-05-11 19:44:22 UTC


README

Discord XMPP Email me License

Laravel i18n Exporter

A simple Laravel package to export your localization files into a JSON. Useful for translation workflows, localization auditing, or integrating with external translation platforms.

πŸš€ Features

  • Export your Laravel PHP Translation files into a single JSON
  • Easy to integrate with your current build and CI system
  • Optional: Run with artisan:optimize

πŸ“¦ Installation

1. Add package via Composer

If you’re using this locally via path repository:

composer require syntafin/laravel-i18n-exporter

βš™οΈ Configuration

If you want to publish the config (optional):

php artisan vendor:publish --tag=i18n-exporter-config

πŸ›  Usage

Run the export command via Artisan:

# Generate JSON files
php artisan i18n:export
# Delete all JSON files
php artisan i18n:clear

This will scan your Laravel lang directory and export all translation keys into a singe JSON.

πŸ“ You can customize the output path, file type, and other options via configuration or CLI options (coming soon).

πŸ§ͺ Testing

TBD β€” unit tests coming soon.

πŸ’‘ Credits

Developed by Syntafin πŸ’™ Feel free to contribute, fork, or open an issue!