承接 sinergi/dictionary 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

sinergi/dictionary

最新稳定版本:0.4.0

Composer 安装命令:

composer require sinergi/dictionary

包简介

PHP Dictionary library

README 文档

README

Build Status Latest Stable Version Total Downloads License

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-03-31