izzle/translation

Izzle Translation Library and Classes

0.3.1 2021-05-06 09:50 UTC

This package is auto-updated.

Last update: 2024-04-06 15:54:48 UTC


README

Simple Translation Lib

Installation

Using npm:

$ composer require izzle/translation

Usage

use Izzle\Translation\Services\Translation;

// Init and load translation file
$translation = new Translation('paht_to_file.json');

// Translate
// Ex. { "global": { "hello": "Hello {0}" } }"
echo $translation->translate('global.hello', ['World']);

Output

Hello World

License

Copyright (c) 2020-present Izzle

MIT License