php-translation/loco-adapter
Composer 安装命令:
composer require php-translation/loco-adapter
包简介
Adapter for loco.
README 文档
README
This is an PHP-translation adapter for Loco (Localise.biz).
Install
composer require php-translation/loco-adapter
Symfony bundle
If you want to use the Symfony bundle you may activate it in kernel:
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Translation\PlatformAdapter\Loco\Bridge\Symfony\TranslationAdapterLocoBundle(), ); }
If you have one Loco project per domain you may configure the bundle like this:
# /app/config/config.yml translation_adapter_loco: index_parameter: 'id' # 'text' or 'name'. Leave blank for "auto" See https://localise.biz/api/docs/export/exportlocale projects: messages: api_key: 'foobar' navigation: api_key: 'bazbar' status: '!untranslated,!rejected' # if you want filter on loco translations statuses. By default only 'translated' translations are pulled.
If you just doing one project and have tags for all your translation domains you may use this configuration:
# /app/config/config.yml translation_adapter_loco: index_parameter: 'id' # 'text' or 'name'. Leave blank for "auto" See https://localise.biz/api/docs/export/exportlocale projects: acme: api_key: 'foobar' domains: ['messages', 'navigation']
This will produce a service named php_translation.adapter.loco that could be used in the configuration for
the Translation Bundle.
If you need to override the HTTPlug client:
# /app/config/config.yml translation_adapter_loco: httplug_client: httplug.client.loco # You can even customize the message and uri factory # httplug_message_factory: null # httplug_uri_factory: null httplug: clients: loco: factory: 'httplug.factory.guzzle6' plugins: - httplug.plugin.content_length - httplug.plugin.logger config: timeout: 2
By default it will use the discovery feature of HTTPlug.
Documentation
Read our documentation at http://php-translation.readthedocs.io.
Contribute
Do you want to make a change? Pull requests are welcome.
php-translation/loco-adapter 适用场景与选型建议
php-translation/loco-adapter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.81M 次下载、GitHub Stars 达 25, 最近一次更新时间为 2016 年 12 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 php-translation/loco-adapter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 php-translation/loco-adapter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.81M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 26
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-12-14