samrm/translations 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

preview


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 the translated pages for the current language.
  • $pages->available() to get the translated and visible pages for the current language.

PageMethods

This plugins goes withs the following PageMethods :

  • $page->isTranslated() to check if the page current translation's status is true
  • $page->isUntranslated() to check if the page current translation's status is not true
  • $page->isAvailable() to check if the page current translation's status is true, and if the page is visible
  • $page->isUnavailable() to check if the page current translation's status is not true, or if the page is not visible

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固