sinergi/dictionary

PHP Dictionary library

Maintainers

👁 sinergi

Package info

github.com/sinergi/dictionary

pkg:composer/sinergi/dictionary

Statistics

Installs: 15 261

Dependents: 2

Suggesters: 0

Stars: 15

Open Issues: 0

0.4.0 2015-05-11 20:00 UTC

Requires

  • php: >=5.4.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 2361e4bfdd360763a8544d730a1e337bafcbaa10

  • Gabriel Bull <me.woop@gabrielbull.com>

textdictionarysinergi

This package is not auto-updated.

Last update: 2026-06-20 23:41:18 UTC


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"
];