定制 hoy/polylang 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hoy/polylang

Composer 安装命令:

composer require hoy/polylang

包简介

A Polylang helper for WordPlate

README 文档

README

A Polylang helper for WordPlate.

Build Status StyleCI Coverage Status Latest Version License

Installation

Require this package, with Composer, in the root directory of your project.

$ composer require hoy/polylang

Login to the WordPress administrator dashboard and activate the Polylang plugin. Go to the Polylang settings page and add at least one language.

Usage

Register the translations with the pll_translations function. They will now be available for translation on the 'Strings translations' page in the WordPress administrator dashboard.

pll_translations([
    'group' => [
        'String that should be translatable by Polylang' => 'Explanation of how the string is used',
    ],
    'general' => [
        'English' => 'The english language',
        'Swedish' => 'The swedish language',
    ],
    'cookie-bar' => [
        'This website uses cookies to ensure you get the best experience on our website.' => 'Cookie bar message',
        'I understand' => 'Cookie bar button text'
    ],
]);

Then to fetch and print a translation you can use the trans function like you would use regular __() function.

echo trans('I understand');

Documentation

Please visit Polylang's documentation to find out more about translating your post types.

License

MIT © Hoy Multimedia AB

统计信息

  • 总下载量: 8k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固