krzar/laravel-translation-generator 问题修复 & 功能扩展

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

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

krzar/laravel-translation-generator

最新稳定版本:v5.0.0

Composer 安装命令:

composer require krzar/laravel-translation-generator

包简介

Translations generator for laravel apps.

README 文档

README

GitHub License GitHub Release GitHub last commit GitHub branch check runs

This package allows you to:

  • Generate translation files for the specified language,
  • Generate new translation files for each language,
  • Completing missing keys for translations

Requirements

Version Laravel PHP Supported
5.x 12.x - 13.x 8.3 - 8.5
4.x 11.x - 12.x 8.2 - 8.5(*)
3.x 10.x - 11.x 8.1 - 8.3
2.x 6.x - 10.x 8.0 - 8.3

Note

*PHP 8.5 is supported for Laravel 12 only

Installation

composer require krzar/laravel-translation-generator

Usage

Note

Remember, this package supports Laravel Prompts. So you can skip commands arguments and just answer the questions.

Generate new translation

Generate new translation files for es language.

php artisan make:translation es

If the file exists, it will be completed with the missing keys.

Files and keys will be copied based on the fallback locale specified in the app configuration.

You can change fallback locale.

If you have published any translations from other packages the command will ask you if you want to generate new language translations for them as well.

php artisan make:translation es --fallback=de

You can also overwrite all values if file currently exists.

php artisan make:translation es --overwrite

All values will be copied from fallback locale by default. If you want to clear every translation value you can use clear-values option.

php artisan make:translation es --clear-values

This will clear values only for new keys, to clear everything, combine two options.

php artisan make:translation es --clear-values --overwrite

Generate new translation file

Generate new php translation file for every language.

php artisan make:translation-file common

This will generate new php file common.php in every language folder (except packages translations folders).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固