Skip to content

mrmuminov/php-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-I18N

Latest Stable Version Total Downloads License

A PHP library for internationalization


Installation

composer require mrmuminov/php-i18n

or add the following to your composer.json:

{
  "require": {
    "mrmuminov/php-i18n": "^v1.0"
  }
}

Usage

<?php

require '../vendor/autoload.php';

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

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

echo $i18n->get('Hello %s', 'Bahriddin');
// Output: "Hello Bahriddin"

// Set language to uz
$i18n->setLanguage('uz');

echo $i18n->get('Hello %s', 'Bahriddin');
// Output: "Salom Bahriddin"

Author

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages