sinergi/dictionary
最新稳定版本:0.4.0
Composer 安装命令:
composer require sinergi/dictionary
包简介
PHP Dictionary library
关键字:
README 文档
README
Localization and text management library for PHP.
Requirements
This library uses PHP 5.4+.
Installation
It is recommended that you install the Dictionary library through composer. To do so, add the following lines to your composer.json file.
{
"require": {
"sinergi/dictionary": "dev-master"
}
}
Usage
Setup the Dictionary class with the path to your text files:
use Sinergi\Dictionary\Dictionary; $language = 'en'; $directory = __DIR__ . "/examples"; $dictionary = new Dictionary( $language, $directory );
You can then use the dictionary like this:
$dictionary['example']['title'];
Examples
See more examples in the examples folder.
Example of a dictionary file:
return [ 'title' => "This is an example" ];
统计信息
- 总下载量: 13.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-03-31