Skip to content

Simple usage

Bahriddin Mo'minov edited this page Dec 16, 2021 · 1 revision

Welcome to the php-i18n wiki!

Include package

<?php

require 'vendor/autoload.php';

$i18n = new \MrMuminov\PhpI18n\I18n([
    'languages' => ['en', 'uz'],
    'language' => 'en',
]);

Only text

echo $i18n->get('Home');
// Output: "Home"

Formatted text

echo $i18n->get('Hello %s', 'John');
// Output: "Hello John"
Clone this wiki locally