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

ActiveSemitexa-module[Localization &amp; i18n](/categories/localization)

semitexa/locale
===============

Semitexa Locale - translation, locale resolution, and i18n support for applications

2026.04.05.0855(1mo ago)0583MITPHPPHP ^8.4

Since Feb 26Pushed 1mo agoCompare

[ Source](https://github.com/semitexa/semitexa-locale)[ Packagist](https://packagist.org/packages/semitexa/locale)[ RSS](/packages/semitexa-locale/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (15)Used By (3)

Semitexa Locale
===============

[](#semitexa-locale)

Internationalization module with per-request locale resolution, coroutine-safe context, and translation with CLDR plural support.

Purpose
-------

[](#purpose)

Resolves the active locale on every request through a composable, configurable resolver chain (commonly cookie, URL path, and Accept-Language header; actual order follows configuration). Stores the result in coroutine-safe context and provides a translation service with CLDR plural rules for Germanic and Slavic languages, with other languages currently falling back to Germanic rules.

Role in Semitexa
----------------

[](#role-in-semitexa)

Depends on Core. Optional integration with Tenancy for tenant-driven locale defaults. Used by SSR for locale-aware template rendering, Mail for localized email content, and any module that needs translated output.

Key Features
------------

[](#key-features)

- Resolver chain (configuration-driven priority): `CookieLocaleResolver`, `PathLocaleResolver`, `HeaderLocaleResolver` (RFC 7231 quality factors)
- Custom resolvers via `LocaleResolverInterface`
- Coroutine-safe `LocaleContextStore` for Swoole
- `TranslationService` with named placeholders and `transChoice()` for plurals
- CLDR plural rules: Germanic (en, de), Slavic East (uk, ru), Slavic West (pl)
- JSON translation files per module (`Application/View/locales/{lang}.json`)
- Module-namespaced keys (`MyModule.welcome`)
- `LocaleResolved` event for post-resolution hooks
- `TenantResolvedLocaleListener` for automatic tenant-based locale when Tenancy is active

Notes
-----

[](#notes)

Translation catalogs are loaded once at worker boot and shared across requests. The context store uses Swoole coroutine storage in HTTP mode and static fallback in CLI/test mode.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance91

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.6% 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 ~3 days

Total

12

Last Release

44d ago

Major Versions

1.0.12 → 2026.04.03.12402026-04-03

### Community

Maintainers

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

---

Top Contributors

[![syntaxwanderer](https://avatars.githubusercontent.com/u/1311643?v=4)](https://github.com/syntaxwanderer "syntaxwanderer (33 commits)")[![needalicense](https://avatars.githubusercontent.com/u/13330467?v=4)](https://github.com/needalicense "needalicense (9 commits)")

---

Tags

i18nlocalelocalizationsemitexatranslationslocalizationi18ntranslationslocalesemitexa

### Embed Badge

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

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

###  Alternatives

[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[aplus/language

Aplus Framework Language Library

2351.7M15](/packages/aplus-language)[punic/punic

PHP-Unicode CLDR

1542.9M29](/packages/punic-punic)[outhebox/laravel-translations

Manage your Laravel translations with a beautiful UI. Add, edit, delete, import, and export translations with ease.

80687.6k](/packages/outhebox-laravel-translations)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)[laravel-lang/locales

Basic functionality for working with localizations

134.5M12](/packages/laravel-lang-locales)

PHPackages © 2026

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