承接 shadcs/lang-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

shadcs/lang-generator

最新稳定版本:v1.0.0

Composer 安装命令:

composer require shadcs/lang-generator

包简介

Translate language files from one language to another using Google Translate.

README 文档

README

Translate language files from one language to another using Google Translate.

Install

composer require shadcs/lang-generator

How to use it

You can use the following

  php artisan lang-translate [from] [to] --source_path=

The generator will translate [from] to [to] language. Get all files and look up files inside [source_path] and get all variables inside the file; create a file and translate using translate.googleapis.com.

This is what the translation process looks like.

❯ php artisan lang-translate en ckb --source_path=en

 🚀 Translate to 'ckb'
 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% -- 💯

Usage example

  • Single output
php artisan lang-translate en ckb --source_path=en
  • Multiple output
php artisan lang-translate en ckb ar fr pt-PT pt-BR zh-CN --source_path=en
  • If you are using json translation
php artisan lang-translate en ckb --source_path=en --json

as well as you can specify the translation destination by using [--destination_path=]

like following:

php artisan lang-translate en ckb --source_path=en --destination_path=path/to/ckb

Authors

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-03