PHPackages                             baraja-core/country - 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. baraja-core/country

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

baraja-core/country
===================

Country manager.

v1.0.8(1y ago)153.8k[1 PRs](https://github.com/baraja-core/country/pulls)3PHPPHP ^8.0

Since Jul 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/baraja-core/country)[ Packagist](https://packagist.org/packages/baraja-core/country)[ Docs](https://github.com/baraja-core/country)[ RSS](/packages/baraja-core-country/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (8)Dependencies (11)Versions (10)Used By (3)

   ![BRJ logo](https://camo.githubusercontent.com/813c67e02a7ab7e4dc900316a4521c3ddf5846fe2cabba7140f3f4b78afda198/68747470733a2f2f63646e2e62726a2e6170702f696d616765732f62726a2d6c6f676f2f6c6f676f2d6461726b2e706e67)
 [BRJ organisation](https://brj.app)

---

Country
=======

[](#country)

Country management package.

Idea
----

[](#idea)

This package provides an interface for working with countries. All countries always return as an entity that meets the Country interface. The specific implementation of the entity is decided by the package itself according to the available environment.

Possible implementations:

- DoctrineCountry
- FileCountry

The default country data is available in the json data file, according to which the data is subsequently updated.

Basic usage
-----------

[](#basic-usage)

The main control logic is in the `CountryManager` service, which provides communication and servicing of database entities.

The country information is stored in Doctrine entities, which are automatically generated on the first call based on a data file downloaded via the API.

We use the [country.io](http://country.io/data/) service to retrieve the data.

[![Country table](doc/table.png)](doc/table.png)

Usage:

```
$manager = new \Baraja\Country\CountryManager;
$manager->getByCode('CZ');
```

Returns:

[![Country entity](doc/entity.png)](doc/entity.png)

🏳️‍🌈 Flag support
-----------------

[](#️‍-flag-support)

The package fully supports the ability to get a country's flag as an emoji. To get it, simply call the method above the entity:

```
$manager = new \Baraja\Country\CountryManager;
$country = $manager->getByCode('CZ');

echo $country->getFlag(); // return 🇨🇿
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 93.5% of commits — single point of failure

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 ~149 days

Recently: every ~246 days

Total

8

Last Release

729d ago

### Community

Maintainers

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

---

Top Contributors

[![janbarasek](https://avatars.githubusercontent.com/u/4738758?v=4)](https://github.com/janbarasek "janbarasek (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![ImgBotApp](https://avatars.githubusercontent.com/u/31427850?v=4)](https://github.com/ImgBotApp "ImgBotApp (1 commits)")

---

Tags

countrycountry-emojicountry-flagcountry-managementemoji-flagentityflaginternationalizationlocalelocalizationstate

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/baraja-core-country/health.svg)

```
[![Health](https://phpackages.com/badges/baraja-core-country/health.svg)](https://phpackages.com/packages/baraja-core-country)
```

###  Alternatives

[php-translation/translator

Translator services

25224.8k5](/packages/php-translation-translator)[longman/laravel-multilang

Package to integrate multi language (multi locale) functionality in Laravel 5.x

5514.5k1](/packages/longman-laravel-multilang)[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1926.6k1](/packages/smmoosavi-php-gettext)[amendozaaguiar/laraveles-spanish-for-jetstream

Archivos de traducción al español latinoamericano para Laravel con Jetstream (auth, pagination, passwords, validation + todas las cadenas de Jetstream).

1512.6k](/packages/amendozaaguiar-laraveles-spanish-for-jetstream)[laradevs/spanish

labels translated to spanish

166.7k](/packages/laradevs-spanish)

PHPackages © 2026

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