samrm/translations
最新稳定版本:v4.0.0
Composer 安装命令:
composer require samrm/translations
包简介
A translations section for kriby-3 panel
README 文档
README
A translations section to switch beween page's languages in Kirby-3 panel.
This section adds and manages a translated status on its page, set to true or false.
It is usefull to keep an overview on a page's translations.
Installation
Download and copy this repository to /site/plugins/translations
Or install it with composer: composer require samrm/translations
Usage
To display the section in your page's panel, set your blueprint as follow :
sections:
translations:
headline: Translations
type: translations
PagesMethods
This plugins goes withs the following PagesMethods :
$pages->translated()to get thetranslatedpages for the current language.$pages->available()to get thetranslatedandvisiblepages for the current language.
PageMethods
This plugins goes withs the following PageMethods :
$page->isTranslated()to check if the page current translation's status istrue$page->isUntranslated()to check if the page current translation's status is nottrue$page->isAvailable()to check if the page current translation's status istrue, and if the page isvisible$page->isUnavailable()to check if the page current translation's status is nottrue, or if the page is notvisible
Routing guards
This plugin comes with a builtin naviguation guard that protects unavailable pages translations.
To enable it, set your config as follow :
return [
'samrm.translations.routing' => true
]
统计信息
- 总下载量: 221
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-07-04
