定制 outhebox/laravel-translations 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

outhebox/laravel-translations

Composer 安装命令:

composer require outhebox/laravel-translations

包简介

Manage your Laravel translations with a beautiful UI. Add, edit, delete, import, and export translations with ease.

README 文档

README

Cover

Installation | Usage | Configuration | Updating | Upgrading from v1 | Contributing

Latest Stable Version Tests Total Downloads PHP from Packagist Laravel Version

Introduction

Laravel Translations provides a beautiful UI for managing your application's translations. Import, edit, search, and export translations — all from a clean dashboard. No npm or Vite required in your project.

Installation

Requirements: PHP 8.3+ and Laravel 11.x or 12.x

composer require outhebox/laravel-translations

Run the install command to publish assets, config, and migrations:

php artisan translations:install

Run migrations:

php artisan migrate

Visit /translations in your browser.

Usage

Importing Translations

php artisan translations:import

To overwrite existing translations:

php artisan translations:import --fresh

Exporting Translations

Export from the UI or via command:

php artisan translations:export

Check Status

php artisan translations:status

Configuration

Publish the config file:

php artisan vendor:publish --tag=translations-config

This publishes config/translations.php where you can configure the path, middleware, authentication, source language, import/export settings, and more.

Updating

After updating the package, re-publish the assets:

php artisan translations:update

You can automate this in your composer.json:

{
    "scripts": {
        "post-update-cmd": ["@php artisan translations:update --ansi"]
    }
}

Laravel Translations Demo

Looking for AI-powered translations, revision history, and team collaboration? Check out Laravel Translations Pro.

Upgrading from v1

v2 is a full rewrite with a new frontend (React/Inertia), new database structure, and updated namespace. Click to expand upgrade instructions.

Steps

  1. Update the package:
composer require outhebox/laravel-translations:^2.0
  1. Run the upgrade command to migrate your v1 data:
php artisan translations:upgrade

This will detect your v1 tables, migrate languages, groups, keys, and translations to the new structure.

  1. Clean up old tables (optional):
php artisan translations:upgrade --cleanup
  1. Publish the new assets:
php artisan translations:install

Breaking Changes

  • Namespace: Outhebox\TranslationsUI is now Outhebox\Translations
  • Frontend: Vue has been replaced with React (no action needed — assets are pre-compiled)
  • Database: New table structure — run the upgrade command above
  • Config: New structure — re-publish with --tag=translations-config

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 811
  • Watchers: 5
  • Forks: 114
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固