shaunthegeek/laravel-lang-db 问题修复 & 功能扩展

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

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

shaunthegeek/laravel-lang-db

最新稳定版本:v1.0.0

Composer 安装命令:

composer require shaunthegeek/laravel-lang-db

包简介

Manage Laravel translations in the database and export them to JSON files.

README 文档

README

Manage Laravel translations in the database and export them to JSON files.

Installation

composer require shaunthegeek/laravel-lang-db

Usage

  1. Run migrations to create the table:
php artisan vendor:publish --tag=laravel-lang-db-migrations
php artisan migrate
  1. Import translations from /lang directory to database:
php artisan lang:import

This will read all .json files in /lang and populate the database. By default, it skips existing keys. Use --force to update existing records:

php artisan lang:import --force
  1. Add translations to the languages table, either by directly operating the database or via the admin interface (e.g., FilamentPHP).
locale key value
en messages.welcome Welcome
zh_CN messages.welcome 欢迎
  1. Export translations to /lang directory:
php artisan lang:export

This will create/update:

  • /lang/en.json
  • /lang/zh_CN.json

Testing

composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固