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.
Requires
- php: ^8.1
- ext-json: *
- laravel/framework: ^11|^12
This package is auto-updated.
Last update: 2025-05-11 19:44:22 UTC
README
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!