insnsk/laravel-translate-excel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

insnsk/laravel-translate-excel

Composer 安装命令:

composer require insnsk/laravel-translate-excel

包简介

Convert translations to/from a single Excel file

README 文档

README

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

This package converts all PHP translations from Laravel`s "lang" directory a single Excel file with dot-arrayed keys. Each file comes to a separate sheet.

Installation

You can install the package via composer:

composer require insnsk/laravel-translate-excel

You can publish the config file with:

php artisan vendor:publish --tag="laravel-translate-excel-config"

This is the contents of the published config file:

return [
    // this is the default locale which will be used as reference
    'main_locale' => 'en',
    // what locations would you like to have in your file
    'locales' => ['en','de','ru','ja']
];

Usage

Just invoke the artisan console command:

php artisan lang:convert

And get your generated file at 'storage/app/translations.xlsx' You can specify filename as a parameter:

php artisan lang:convert to my_filename.xlsx

After you translate the file in Excel you would probably need to get it back to your app. So put your translated file "my_filename.xlsx" into "storage/app" directory, then run:

php artisan lang:convert from my_filename.xlsx

PHP-translation files will be generated into "storage/lang" folder. Just copy them back to your app root.

Changelog

Readme update & config publish

Security Vulnerabilities

This package was made just for my needs, so it was not tested at all and the code is not perfect also. Use it at your own risk.

Credits

License

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

统计信息

  • 总下载量: 157
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-26