backpack/translation-manager
Composer 安装命令:
composer require backpack/translation-manager
包简介
Translation Manager for Backpack
README 文档
README
Translation Manager provides a simple user interface to help you deal with translations in your Backpack application. At a quick glance, some of the most relevant features are:
- View a list of all translations present in your application's language files.
- Edit translations directly from the interface.
- Search and filter translations for easy management.
This package uses the battle tested spatie/laravel-translation-loader under the hood.
Preview
Demo
Try it right now, edit some translations in our online demo.
Installation
In your Laravel + Backpack project:
1) Install the package using Composer:
composer require backpack/translation-manager
2) Configure the application
If you already had spatie/laravel-translation-loader installed and configured, you can skip to the next step. Otherwise, follow along.
2.1) In your config/app.php you must replace Laravel's translation service provider:
-Illuminate\Translation\TranslationServiceProvider::class, +Spatie\TranslationLoader\TranslationServiceProvider::class,
2.2) You must publish and run the migrations to create the language_lines table:
php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="migrations" php artisan migrate
3) Optional setup options
3.1) Add a menu item to menu_items.blade.php for easy access:
php artisan backpack:add-menu-content "<x-backpack::menu-item title=\"Translation Manager\" icon=\"la la-stream\" :link=\"backpack_url('translation-manager')\" />"
3.2) Publish the config files:
php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="config" php artisan vendor:publish --provider="Backpack\TranslationManager\AddonServiceProvider" --tag="config"
NOTE: We highly recommend you to use this package alongside Language Switcher package, so that you can easily switch between languages in your panel.
Usage
List View:
The list view displays a comprehensive list of all translations within your application translation folder (usually lang/). Please do note that translations in lang/vendor/xxx folders are not possible to translate using this package.
Additionally, if you have Backpack Pro installed, your admin can also see and use the filters, to quickly narrow down translations.
Edit View
Any translation can be edited by clicking the Edit button. It will open a page where the admin can input the new value, for all languages.
Once edited, the changes are saved to the database for persistence. All translations on the database have priority over the ones in the language files. This means that you can safely let your admin edit translations, in production. Your auto-deploys will continue working, because no files get edited, only DB entries.
Editable Columns
If you have the Editable Columns package installed, the admin can directly edit translations within the List View. This provides an excellent UX - because they can translate everything much much faster, without having to switch pages.
If you don't want that behavior you can disable it in the config/backpack/translation-manager.php file by setting use_editable_columns => false.
If you don't find that file, see above the optional steps to publish the config files.
Security
If you discover any security related issues, please email cristian.tabacitu@backpackforlaravel.com instead of using the issue tracker.
Credits
License
This project was released under MIT License, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.
backpack/translation-manager 适用场景与选型建议
backpack/translation-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22.68k 次下载、GitHub Stars 达 52, 最近一次更新时间为 2024 年 04 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「translationmanager」 「backpack」 「Backpack for Laravel」 「Backpack Addon」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 backpack/translation-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 backpack/translation-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 backpack/translation-manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
An interface to edit language files, for Laravel Backpack.
Extended summernote fields for laravel backpack
An interface to edit Laravel language files, for Dick Admin.
Use a translation namespace vor mutliple translation files.
Ready to use Documents Backpack CRUD with API route for eg. privacy statement, imprint, sbt or gtc
Dropzone field for Laravel Backpack
统计信息
- 总下载量: 22.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 52
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-02