colorium/text

Colorium Text Helpers

dev-master 2016-02-11 13:22 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:51:01 UTC


README

Lang Helper

$langs = [
    'en' => [
        'demo.hello' => 'Hello !',
        'demo.pears' => 'Can you buy {number} pears, please ?'
    ]
];

use Colorium\Text\Lang;

Lang::load($langs, 'en');

echo Lang::get('demo.hello'); // Hello !
echo Lang::get('demo.pears', ['number' => 18]); // Can you buy 18 pears, please ?

Install

composer require colorium/text