novius/laravel-translation-loader 问题修复 & 功能扩展

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

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

novius/laravel-translation-loader

最新稳定版本:3.3.0

Composer 安装命令:

composer require novius/laravel-translation-loader

包简介

Store your language lines in the database, yaml or other sources

README 文档

README

Novius CI Packagist Release Licence

This package is an adaptation of spatie/laravel-translation-loader

WARNING: this package is currently in development.

Features added

  • Translations namespace compatibility ;
  • Console commands to synchronise translations from files to DB;

Requirements

  • PHP >= 8.1
  • Laravel Framework >= 9.0

NOTE: These instructions are for Laravel >= 9.0. If you are using prior version, please see the previous version's docs.

Installation

composer require novius/laravel-translation-loader:dev-master

In config/app.php (Laravel) you should replace Laravel's translation service provider

Illuminate\Translation\TranslationServiceProvider::class,

by the one included in this package:

Novius\TranslationLoader\TranslationServiceProvider::class,

You must publish and run the migrations to create the language_lines table:

php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="migrations"
php artisan migrate

Publish languages files:

php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="lang"

Optionally you could publish the config file using this command.

php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="config"

Commands

# Synchronise translations from files to DB
php artisan translations:sync

# Clear DB translations + re-import them
php artisan translations:reset

Lint

Run php-cs with:

composer run-script lint

Contributing

Contributions are welcome! Leave an issue on Github, or create a Pull Request.

Licence

This package is under MIT Licence.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-07