PHPackages                             simplecomplex/locale - 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. simplecomplex/locale

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

simplecomplex/locale
====================

Locale and language utilities, .ini configuration based localization.

2.1.3(7y ago)12031MITPHPPHP &gt;=7.0

Since Jul 12Pushed 7y ago2 watchersCompare

[ Source](https://github.com/simplecomplex/php-locale)[ Packagist](https://packagist.org/packages/simplecomplex/locale)[ Docs](https://github.com/simplecomplex/php-locale)[ RSS](/packages/simplecomplex-locale/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (15)Used By (1)

Locale
------

[](#locale)

### Localization, primarily of texts

[](#localization-primarily-of-texts)

Texts are referred by (free format) IDs.
.ini-file based.

Superior to gettext (.po) in these ways:

- texts (translations) don't get *orphaned* when you change the source text
- editors/translators work in standard plaintext editors
- texts can be organised in groups and sub groups.
- no need for complex parsers and im-/export features, databases etc.
- miniscule resource footprint

### .ini-file example

[](#ini-file-example)

```
[some-group]
meeting = reunión
some-sub-group[start] = ¡Hola!
some-sub-group[continue] = ¿Cómo estás?
some-sub-group[end] = Hasta luego...
```

### Dependency injection container ID: locale

[](#dependency-injection-container-id-locale)

Recommendation: access (and thus instantiate) locale via DI container ID 'locale'.
See [SimpleComplex Utils](https://github.com/simplecomplex/php-utils) `Dependency`.

### CLI commands

[](#cli-commands)

```
# List all locale-text commands and their help.
php cli.php locale-text -h
# One command's help.
php cli.php locale-text-xxx -h

# Display/get value of a locale-text item.
php cli.php locale-text-get language section key

# Set a locale-text item.
php cli.php locale-text-set language section key value

# Delete a locale-text item.
php cli.php locale-text-delete language section key

# Refresh a locale-text store from .locale-text.[language].ini file sources.
php cli.php locale-text-refresh language

# Export a locale-text store as JSON to a file.
php cli.php locale-text-export language target-path-and-file
```

### Installation

[](#installation)

Copy the 'global' config .ini file (see [SimpleComplex Config](https://github.com/simplecomplex/php-config))
`[locale package dir]/`**`config-ini/locale.global.ini`**
and place it in *config*'s 'base' or 'override' path.

Follow the instructions within in that file,
and modify it to suit the current system's structure and features.

### Requirements

[](#requirements)

- PHP &gt;=7.0
- [SimpleComplex Config](https://github.com/simplecomplex/php-config)
- [SimpleComplex Utils](https://github.com/simplecomplex/php-utils)

##### Suggestions

[](#suggestions)

- [SimpleComplex Inspect](https://github.com/simplecomplex/inspect)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98.1% 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 ~57 days

Recently: every ~71 days

Total

12

Last Release

2594d ago

Major Versions

0.9 → 1.02017-09-24

1.x-dev → 2.02018-06-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc4dc35e0d2b8e4619ae2fe2d083cb3c64b09127ecb318c3909025fc0aae1e7f?d=identicon)[jacobfriis](/maintainers/jacobfriis)

---

Top Contributors

[![jacobfriis](https://avatars.githubusercontent.com/u/3807905?v=4)](https://github.com/jacobfriis "jacobfriis (52 commits)")[![simplecomplex](https://avatars.githubusercontent.com/u/10960036?v=4)](https://github.com/simplecomplex "simplecomplex (1 commits)")

---

Tags

internationalizationlocalelocalizationphpphp7psrphplocalizationconfigurationlocale

### Embed Badge

![Health badge](/badges/simplecomplex-locale/health.svg)

```
[![Health](https://phpackages.com/badges/simplecomplex-locale/health.svg)](https://phpackages.com/packages/simplecomplex-locale)
```

###  Alternatives

[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[codezero/laravel-localizer

Automatically detect and set an app locale that matches your visitor's preference.

50394.3k4](/packages/codezero-laravel-localizer)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

2770.1k1](/packages/opgginc-codezero-laravel-localized-routes)[awes-io/localization-helper

Package for convenient work with Laravel's localization features

3527.1k4](/packages/awes-io-localization-helper)[macmotp/locale

A curated library to handle locale in PHP

507.1k](/packages/macmotp-locale)[jrmajor/fluent

Fluent localization system for PHP

2716.9k5](/packages/jrmajor-fluent)

PHPackages © 2026

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