Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.
/ i18n-php Public archive

A small instrument for help us use internalization company standard.

License

Notifications You must be signed in to change notification settings

microparts/i18n-php

Repository files navigation

This package deprecated and abandoned.

I18n For PHP

CircleCI codecov

A small instrument for help us use internalization company standard. Have a hard dependency from configuration package.

Installation

composer install microparts/i18n-php

Usage

Basic:

$manager = new Manager($conf); // $conf is a our default configuration module
$i18n = $manager->load();

$i18n->getDisplayLang();
$i18n->isTranslateList();
$i18n->getFallbackLang();
$i18n->getSecondLang();

With headers, but headers from PSR MessageInterface:

$manager = new Manager($conf); // $conf is a our default configuration module
$i18n = $manager->withMessage($request)->load();

$i18n->getDisplayLang();
$i18n->isTranslateList();
$i18n->getFallbackLang();
$i18n->getSecondLang();

With headers, but headers from other source:

$manager = new Manager($conf); // $conf is a our default configuration module
$i18n = $manager->withHeaders($headers)->load(); // where $headers is a key => value array of headers

$i18n->getDisplayLang();
$i18n->isTranslateList();
$i18n->getFallbackLang();
$i18n->getSecondLang();

Depends

  • >= PHP 7.2
  • Composer for install package

License

GNU GPL v3

About

A small instrument for help us use internalization company standard.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages