定制 krinkle/intuition 二次开发

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

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

krinkle/intuition

最新稳定版本:v2.3.6

Composer 安装命令:

composer require krinkle/intuition

包简介

Localisation library for PHP applications.

README 文档

README

Packagist

Intuition

Intuition is a localisation library for PHP applications. Intuition is designed for use by web applications on Wikimedia Toolforge, but is implemented as a standalone library that is available for any application via its Composer package.

It was originally developed in 2011 for use on Wikimedia Toolserver (since then replaced by Toolforge).

Intuition (INTUI-tion) originally stood for "Internationalization for Toolserver's User Interface".

Intuition supports the Banana Milkshake message file format (developed for use in MediaWiki). We recommended translatewiki.net for managing translations, which allows contributors to translate and review message via a user-friendly interface, which are then periodically automatically exported in the Banana JSON format to your Git repository.

Install

It's recommended you use Composer.

  • Run composer require krinkle/intuition.
  • Include vendor/autoload.php in your program.

Usage

To use it in a tool, read the Usage documentation.

Example:

require_once __DIR__ . '/vendor/autoload.php';

$int = new Intuition( 'mytool' );
$int->registerDomain( 'mytool', __DIR__ . '/i18n' );

echo $int->msg( 'example' );

Getting involved

Report issues by creating a Phabricator task.

Code coverage can be found at https://doc.wikimedia.org/cover/labs-tools-intuition/.

Testing

Use Composer for managing dependencies (such as PHPUnit). Install Composer via your preferred package manager, or from source. Some tests also require Node.js.

Prior to running tests, ensure presence of development dependencies:

composer install

Run the tests:

composer test

See also

统计信息

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

GitHub 信息

  • Stars: 39
  • Watchers: 13
  • Forks: 25
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-07