asperhsu / lang-excel-converter
Laravel localization import/export to excel converter
1.0.0
2019-03-23 06:45 UTC
Requires
- illuminate/support: ~5
- maatwebsite/excel: ^3.1
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~7.0
- sempro/phpunit-pretty-print: ^1.0
This package is auto-updated.
Last update: 2025-04-23 21:24:11 UTC
README
Lang Excel Converter
Export localization to Excel. Each sheet is a group contains its' all locales translation. Import Excel to localization files.
Installation
Via Composer
$ composer require asper/langexcelconverter
Usage
Import
Command:
php artisan lang-excel:import {filename=translations.xlsx} {--disk}
Controller:
use Maatwebsite\Excel\Facades\Excel; use Asper\LangExcelConverter\Imports\TranslationsImport; Excel::import(new TranslationsImport, 'YOUR FILE');
Export
Command:
php artisan lang-excel:export {filename=translations.xlsx} {--disk}
Controller:
use Maatwebsite\Excel\Facades\Excel; use Asper\LangExcelConverter\Exports\TranslationsExport; // store Excel::store(new TranslationsExport, 'YOUR FILE NAME'); // send download response return Excel::download(new TranslationsExport, 'YOUR FILE NAME');
more Excel Facade usage: Maatwebsite/Laravel-Excel
Demo Project
asperhsu/langexcelconverter-demo
Troubleshooting
"SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)" when import
- publish excel config
php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"
- change config
[ ... 'transactions' => [ 'handler' => null, // change 'db' to null ], ... ]