PHPackages                             timur-flush/phalclate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. timur-flush/phalclate

ActiveLibrary[Localization &amp; i18n](/categories/localization)

timur-flush/phalclate
=====================

A library of internationalization.

v2.1.0(7y ago)033BSD-3-ClausePHPPHP ^7.2.0

Since Feb 12Pushed 7y agoCompare

[ Source](https://github.com/TimurFlush/phalclate)[ Packagist](https://packagist.org/packages/timur-flush/phalclate)[ RSS](/packages/timur-flush-phalclate/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (11)Used By (0)

[![Build Status](https://camo.githubusercontent.com/8941e9a5b51836f6605373edf8d3d04d9f9072463132c57a73fc1e626e5b8c72/68747470733a2f2f7472617669732d63692e6f72672f54696d7572466c7573682f7068616c636c6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/TimurFlush/phalclate)[![Coverage Status](https://camo.githubusercontent.com/0e01e380eb64c6a515eb5a328e10f08e84928a40c98fc0cd469929cbf6a097b9/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f54696d7572466c7573682f7068616c636c6174652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/TimurFlush/phalclate?branch=master)

Phalclate
=========

[](#phalclate)

Phalclate is library developed for internationalization.

*p.s I will make normal documentation when my library will be the focus of people's attention. For other questions, please contact me in Telegram.*

### Installation

[](#installation)

```
composer require timur-flush/phalclate:^2.0
```

Via Pdo\\Postgresql adapter:

Table structure:

id(serial)key(varchar255)language(char2)region(varchar255)value(text)1positionenGBcentre3helloen\[NULL\]Hello, %name%.```
use TimurFlush\Phalclate\Adapter\Pdo\Postgresql as PHAdapter;

$adapter = new PHAdapter(
    [
        'host' => '127.0.0.1', #Host
        'port' => 5432, #Port
        'dbname' => '', #Database name
        'username' => '', #Username
        //'password' => '', #Password of user (Optional parameter)
        //'schema' => '', # Database schema (Optional parameter, by default: public)
        'tableName' => 'translations' # Name of table
    ]
);
```

```
use TimurFlush\Phalclate\Manager as PHManager;
use TimurFlush\Phalclate\Entity\{
    Language as PHLanguage,
    Region as PHRegion
};

//Initialize of russian language.
$ru = new PHLanguage('ru');

//Setup of region (optional)
$ru->addRegion(
    new PHRegion('ru')
);

//Initialize of english language.
$en = new PHLanguage('en');

//Setup of regions (optional)
$en->setRegions([
    new PHRegion('US'),
    new PHRegion('GB')
]);

$manager = new PHManager(
    $adapter,
    [
        'baseLanguages' => [$ru, $en], //Base languages (Required, Array of PHLanguage objects)
        'currentLanguage' => 'en', //Current language (Required, One of the above else will be throwed exception)
        'currentRegion' => 'US', //Current region (Optional, Any, however if the region is not found then it will not be setted.)
        'failOverTranslation' => 'lol' //Fail over translation (Optional)
    ]
);

//Example 1
echo $manager->getTranslation(
    'hello',
    true, //passed boolean argument is first fetch mode. (Optional, Allows the use of translations from other regions, by default false)
    ['name' => 'John'] //passed array argument is placeholders. (Optional)
    '' //Passed string argument is custom fail over translation. (Optional)
); // Hello, John.
//Please note that the last 3 arguments can be passed in any order.

//Example 2
echo $manager->getTranslation('notFoundable'); // lol

//Example 3
echo $manager->getTranslation('position', true); //centre

//Example 4
echo $manager->getTranslation('notFoundable', 'kek'); //kek
```

### Requirements

[](#requirements)

NameVersionPHP^7.2.0Phalcon framework^3.4.0### Author

[](#author)

Timur Flush. Telegram: @flush02 or

License
-------

[](#license)

BSD-3-Clause

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity64

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Recently: every ~84 days

Total

10

Last Release

2669d ago

Major Versions

1.0.6 → v2.0.02019-01-21

PHP version history (2 changes)v1.0.0PHP ^7.1.0

v2.0.0PHP ^7.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29764676?v=4)[timurflush](/maintainers/TimurFlush)[@TimurFlush](https://github.com/TimurFlush)

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/timur-flush-phalclate/health.svg)

```
[![Health](https://phpackages.com/badges/timur-flush-phalclate/health.svg)](https://phpackages.com/packages/timur-flush-phalclate)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[symfony/string

Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way

1.8k724.1M827](/packages/symfony-string)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[sepia/po-parser

Gettext \*.PO file parser for PHP.

1271.5M19](/packages/sepia-po-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
