PHPackages                             domprojects/codeigniter4-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. domprojects/codeigniter4-country

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

domprojects/codeigniter4-country
================================

Translated country helper for CodeIgniter 4 projects.

v1.0.1(2mo ago)01↓90%MITPHPPHP ^8.2CI passing

Since Apr 2Pushed 2mo agoCompare

[ Source](https://github.com/domProjects/codeigniter4-country)[ Packagist](https://packagist.org/packages/domprojects/codeigniter4-country)[ Docs](https://github.com/domProjects/codeigniter4-country)[ RSS](/packages/domprojects-codeigniter4-country/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Country for CodeIgniter 4
=========================

[](#country-for-codeigniter-4)

[![Packagist](https://camo.githubusercontent.com/c8014e8a4e342362f13590c3b19c5d440525a9388b621f2dd151380ed87a7071/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6d70726f6a656374732f636f646569676e69746572342d636f756e7472793f6c6162656c3d5061636b6167697374)](https://packagist.org/packages/domprojects/codeigniter4-country)[![License](https://camo.githubusercontent.com/5b75c470d4bffc145d9d2181877ab5fcd43e230d9fe31f009dad9ae036b9f059/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646f6d50726f6a656374732f636f646569676e69746572342d636f756e747279)](https://github.com/domProjects/codeigniter4-country/blob/main/LICENSE)[![PHPUnit](https://camo.githubusercontent.com/dfd804d8ef98fb51fc859512f4a53ddf2e12b9075207492f764a8d8b996cd7bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646f6d50726f6a656374732f636f646569676e69746572342d636f756e7472792f706870756e69742e796d6c3f6272616e63683d6d61696e266c6162656c3d504850556e6974)](https://github.com/domProjects/codeigniter4-country/actions/workflows/phpunit.yml)[![Psalm](https://camo.githubusercontent.com/0ef4b0736406e073f8c34ab8368e9dd5660fec6713888081aa5dca46a48002dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646f6d50726f6a656374732f636f646569676e69746572342d636f756e7472792f7073616c6d2e796d6c3f6272616e63683d6d61696e266c6162656c3d5073616c6d)](https://github.com/domProjects/codeigniter4-country/actions/workflows/psalm.yml)[![PHPStan](https://camo.githubusercontent.com/2c1d58ddda2376da0a9249c0fc2f07fb0574a14d37b33ddd3fa5e75c57cb314c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646f6d50726f6a656374732f636f646569676e69746572342d636f756e7472792f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d5048505374616e)](https://github.com/domProjects/codeigniter4-country/actions/workflows/phpstan.yml)

Translated country helper for CodeIgniter 4.

This package provides:

- a translated country list
- country name lookup from ISO code
- a ready-to-use country dropdown helper
- list of all countries with names and ISO 3166-1 codes

Installation
------------

[](#installation)

```
composer require domprojects/codeigniter4-country
```

Usage
-----

[](#usage)

Load the helper:

```
helper('country');
```

Get the translated country list:

```
$countries = countryList();
```

Translate an ISO code:

```
$name = countryIsoToName('fr');
```

Render a dropdown:

```
echo countryDropdown('country', ['class' => 'form-select'], 'FR');
```

Available Functions
-------------------

[](#available-functions)

- `countryList(): array`
- `countryIsoToName(string $iso): string`
- `countryDropdown(string $name, array|string $extra = '', array|string $selected = ''): string`

Locales
-------

[](#locales)

The package currently includes translated country files for:

- English
- French
- German

The helper uses the current CodeIgniter locale automatically through `lang()`.

Additional locales can be added over time.

Package Structure
-----------------

[](#package-structure)

```
src/
  Helpers/
    country_helper.php
  Language/
    /
      Country.php

```

Language Source
---------------

[](#language-source)

The language files are based on data from:

- [@umpirsky](https://github.com/umpirsky)
-

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance84

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

2

Last Release

83d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4879685?v=4)[Emmanuel Campait](/maintainers/domProjects)[@domProjects](https://github.com/domProjects)

---

Tags

codeignitercodeigniter4countriescountrycountry-codesdropdowniso3166-1helperlocalizationcodeignitercountriescountrycodeigniter4

### Embed Badge

![Health badge](/badges/domprojects-codeigniter4-country/health.svg)

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

###  Alternatives

[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k8.0M62](/packages/rinvex-countries)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1731.9M](/packages/dougsisk-laravel-country-state)[codeigniter4/settings

Settings library for CodeIgniter 4

95589.6k34](/packages/codeigniter4-settings)[codeigniter4/tasks

Task Scheduler for CodeIgniter 4

124177.3k1](/packages/codeigniter4-tasks)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

69201.9k120](/packages/codeigniter4-devkit)[stidges/country-flags

A small package to convert a country code to the corresponding country flag emoji

29274.4k4](/packages/stidges-country-flags)

PHPackages © 2026

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