motia/laravel-translations-port
Composer 安装命令:
composer require motia/laravel-translations-port
包简介
Import/Export your laravel translations(including the missing ones!) to/from your separate frontend apps.
关键字:
README 文档
README
This package comes with a translation manager laravel-translation-manager and gives it the ability to import/export and a translation group to json or yaml.
Setup
- Install the package.
composer require motia/laravel-translations-port
- (optional if
autodiscoveryis on) Add the service providerMotia\TranslationsPort\TranslationsPortProvider - Publish the config file using the command
php artisan vendor:publish --provider="Motia\TranslationsPort\TranslationsPortProvider"
- Setup and configure vsch/laravel-translation-manager
- (optional) if you want to use
yamlformat runcomposer install "symfony/yaml" "^4.0"
Usage
- Import translations from file to database
php artisan trans:import
- Export translations from database to file
php artisan trans:import
- Missing translations This package comes with a controller to add missing translations and a helper function to add it to your routes.
// routes/api.php <?php use Motia\TranslationsPort\Controller as TranslationsPortController; TranslationsPortController::routes([ 'prefix' => 'translations-port', 'middleware' => 'cors', ]);
// on your client app axios.post('/missing', { key: 'namespaced.key', locale: 'en', group: 'client_app' // optional, defaults config('translations-port.groups')[0]. })
motia/laravel-translations-port 适用场景与选型建议
motia/laravel-translations-port 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 03 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「i18n」 「import」 「translations」 「export」 「laravel」 「translations manager」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 motia/laravel-translations-port 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 motia/laravel-translations-port 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 motia/laravel-translations-port 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy to use i18n translation PHP class for multi-language websites
A custom URL rule class for Yii 2 which allows to create translated URL rules
Parse use statements for a reflection object
Deepl Automated translations for Laravel lang files
Tool for copying data from a production database to a dev database. Also useful for making backups of production databases.
A fork of konnco/filament-import with support of Laravel 11 since the default importer of Filament 3 is nonsense for basic use case.
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-10