apploud/nette-doctrine-translatable
最新稳定版本:v0.5.0
Composer 安装命令:
composer require apploud/nette-doctrine-translatable
包简介
Extension for Nette framework that simplifies translating of Doctrine entities.
README 文档
README
Translatable behaviour extension for Doctrine2 as Nette extension
Installation
The best way to install TranslationsConverter is using Composer:
$ composer require apploud/nette-doctrine-translatable
You can enable the extension using your neon config.
extensions: translatable: Apploud\Doctrine\Translatable\DI\TranslatableExtension
You also need to have an instance of Doctrine\ORM\EntityManager defined as a service with autowiring turned on (or pass it in configuration).
Configuration
Configuration example with all possible settings:
translatable: entityManager: @doctrine.entityManager defaultLocale: defaultLocale currentLocale: currentLocale fallbackLocale: fallbackLocale currentLocaleResolver: [@resolverService, 'getCurrentLocale'] fallbackLocaleResolver: [@resolverService, 'getFallbackLocale']
All settings are optional. If entityManager is missing, it will be autowired. Any other value defaults to NULL. Locale resolver can be any callable.
When determining current and fallback locales, priorities are:
- locale value
- value from locale resolver
- default locale
Usage
统计信息
- 总下载量: 16.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2016-11-14