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

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

escalated-dev/locale
====================

Canonical Escalated locale bundle for PHP consumers (Laravel, Symfony, WordPress, Filament).

v0.1.8(2mo ago)21.9k↑25.8%2MITPythonPHP ^8.1CI passing

Since May 2Pushed 1mo agoCompare

[ Source](https://github.com/escalated-dev/escalated-locale)[ Packagist](https://packagist.org/packages/escalated-dev/locale)[ Docs](https://github.com/escalated-dev/escalated-locale)[ RSS](/packages/escalated-dev-locale/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)DependenciesVersions (9)Used By (2)

escalated-locale
================

[](#escalated-locale)

**Website:** [escalated.dev](https://escalated.dev)

`escalated-locale` is the central source of truth for Escalated translations. It consolidates locale catalogs from the Vue frontend and the framework plugins into a single canonical `locales/{locale}.json` set, then republishes that data through thin ecosystem-specific packages.

Architecture
------------

[](#architecture)

```
portfolio source repos
  -> escalated-locale/locales/*.json
     -> npm package        (@escalated-dev/locale)
     -> Composer package   (escalated-dev/locale)
     -> RubyGem            (escalated-locale)
     -> PyPI package       (escalated-locale)
     -> Maven package      (dev.escalated:escalated-locale)
     -> NuGet package      (Escalated.Locale)
     -> Hex package        (:escalated_locale)
     -> Go module          (github.com/escalated-dev/escalated-locale/packages/go)
        -> consumed by framework plugins
           -> merged with repo-local overrides at app boot

```

How To Add A Translation
------------------------

[](#how-to-add-a-translation)

1. Update the source translation in the portfolio repo, or edit `locales/en.json` directly if the central package is now the canonical owner.
2. Run `python scripts/build_locales.py` (regenerates the canonical JSON from upstream sources, if needed).
3. Run the sync script: `bash scripts/sync.sh` (Linux/macOS/git-bash) or `pwsh ./scripts/sync.ps1` (Windows). Both write the same outputs — JSON copies into each `packages/*/` plus framework-native artifacts (Rails YAML, Django/WP gettext, Symfony YAML, Spring properties, Phoenix .po) via `scripts/build_native_artifacts.py`.
4. Commit the locale changes and the synced package copies.
5. Tag a release when the bundle is ready to publish.

How To Add A Locale
-------------------

[](#how-to-add-a-locale)

1. Copy `locales/en.json` to `locales/{locale}.json`.
2. Translate the values.
3. Run `bash scripts/sync.sh` (or `pwsh ./scripts/sync.ps1`).
4. Commit the new locale and synced package copies.

Override Pattern
----------------

[](#override-pattern)

Each plugin should load the package locale data first, then layer its own framework-local overrides on top. The plugin remains free to keep framework-specific translations or emergency patches in its own repo; the central package provides the base catalog and fallback chain.

Conventions
-----------

[](#conventions)

- **Locale set**: `ar`, `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, `nl`, `pl`, `pt-BR`, `ru`, `tr`, `zh-CN`. New locales are added by copying `en.json`.
- **Placeholder syntax**: `{name}` (curly-brace named tokens, e.g. `"Welcome {firstName}"`). The wrapper `t()` helpers interpolate these.
- **Key naming**: lowerCamelCase with dot-separated namespaces (e.g. `ticket.status.open`).
- **Conflict resolution** (when the same key appeared in multiple source repos with divergent values): Vue frontend wins, then Laravel, Filament, Rails, the compact backend cluster, Django, and WordPress in that order.
- **Gettext namespaces**: Django strings live under `djangoStrings.*` and WordPress strings under `wordpressStrings.*`, keyed deterministically from the English `msgid`.
- **Missing translations**: a key absent from a non-English locale falls back to the English value (no empty strings shipped).

Packages
--------

[](#packages)

### npm

[](#npm)

```
const { getLocaleData, t } = require('@escalated-dev/locale')

const messages = getLocaleData('fr')
const label = t('ticket.subject', 'fr')
```

### Composer

[](#composer)

```
use Escalated\Locale\Locale;

$messages = Locale::getLocaleData('fr');
$label = Locale::translate('ticket.subject', 'fr');
```

### RubyGems

[](#rubygems)

```
require "escalated/locale"

messages = Escalated::Locale.get_locale_data("fr")
label = Escalated::Locale.t("ticket.subject", "fr")
```

### Maven

[](#maven)

```
import dev.escalated.locale.Locale;

Map messages = Locale.getLocaleData("fr");
String label = Locale.translate("ticket.subject", "fr", Map.of());
```

### NuGet

[](#nuget)

```
using Escalated.Locale;

var messages = LocaleData.GetLocaleData("fr");
var label = LocaleData.Translate("ticket.subject", "fr");
```

### Hex

[](#hex)

```
messages = Escalated.Locale.get_locale_data("fr")
label = Escalated.Locale.t("ticket.subject", "fr")
```

### PyPI (Python / Django)

[](#pypi-python--django)

```
from escalated_locale import get_locale_data, get_django_locale_path

messages = get_locale_data("fr")  # returns dict from locales/fr.json

# In Django settings.py, layer this dir into LOCALE_PATHS so
# escalated_locale/locale//LC_MESSAGES/django.{po,mo} is picked up
# by gettext.
LOCALE_PATHS = [
    BASE_DIR / "locale",  # project overrides (highest priority)
    str(get_django_locale_path()),
]
```

### Go

[](#go)

```
import escalatedlocale "github.com/escalated-dev/escalated-locale/packages/go"

messages := escalatedlocale.GetLocaleData("fr")
label, _ := escalatedlocale.Translate("ticket.subject", "fr", nil)
```

Versioning
----------

[](#versioning)

Semantic versioning applies to the canonical JSON keys and wrapper APIs:

- Major: key removals, key renames, or breaking wrapper API changes.
- Minor: new keys or new locales.
- Patch: string updates, fallback fixes, and packaging-only changes.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance87

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

8

Last Release

79d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f1e8418623e51236a1fd63d1da722d2b15a8a8b067b10d520580fd3e9a6e509?d=identicon)[MatthewGross](/maintainers/MatthewGross)

---

Top Contributors

[![mpge](https://avatars.githubusercontent.com/u/3311227?v=4)](https://github.com/mpge "mpge (36 commits)")

### Embed Badge

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

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

PHPackages © 2026

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