liberusoftware/localization-core-api
A Laravel package that delivers the core localization API, giving applications a consistent foundation for managing locales, languages, and related configuration. Designed to integrate smoothly with the wider Liberu software ecosystem.
Architecture fit
localization-core-api positions itself as a presentation adapter — the HTTP/API edge over a localization domain core. Architecturally that is a healthy pattern (ports-and-adapters): the adapter owns routing, request validation, serialization, and versioning; the sibling localization-core package owns the translation store, locale negotiation, and fallback logic. For a team already running a modular Laravel monolith (nwidart-style modules, or a hand-rolled packages/ workspace), a thin adapter is a low-blast-radius addition: it can be mounted behind a feature flag, versioned independently (/api/v1/locales), and removed without touching domain code.
The caveat is that an adapter has near-zero standalone value. Its behavior — and therefore its technical merit — is entirely inherited from packages in the same liberusoftware namespace, which share the same zero-star, zero-dependent profile. Adopting the adapter means adopting the whole dependency chain, including any transitive Laravel-version pins the core enforces. Treat the unit of evaluation as the suite, not this repository.
Integration feasibility
Mechanically trivial: composer require, Laravel package auto-discovery or a manual ServiceProvider registration, php artisan vendor:publish for config and route files, then a route-prefix/middleware decision. A competent Laravel engineer can have it responding locally in under an hour. That is the full extent of the good news.
Feasibility confidence is low because the artifacts a TPM needs to de-risk an integration are absent: no README-level contract, no published API schema (OpenAPI/JSON:API), no documented locale-resolution semantics, no visible CI badge or coverage signal, no changelog discipline. You cannot write an integration test plan against an undocumented contract, so the true cost is archaeology, not installation.
Technical risk
| Risk | Severity | Rationale |
|---|---|---|
License = NOASSERTION |
Blocking | Not an OSI-identified license. GitHub could not classify it. Legal cannot approve commercial/internal distribution until the actual LICENSE file is read and counsel signs off. This alone can kill the evaluation. |
| Zero stars / zero dependents | High | No production evidence, no third-party bug reports, no Stack Overflow corpus. Every edge case is yours to discover. |
Release date 2026-10-26 |
High | A future-dated "last release" indicates placeholder versioning, a misconfigured CI tag, or fabricated metadata. Either way, the release pipeline is not trustworthy — you cannot rely on semver to signal breaking changes. |
| Bus factor of one | High | liberusoftware/* appears single-maintainer. No foundation, no corporate sponsor, no contributor graph. |
| Contract instability | Medium-High | "Presentation adapter" is exactly the layer most likely to churn (response shapes, pagination, error envelopes) while the core stabilizes. |
| Namespace/module coupling | Medium | Requires the liberusoftware module loader conventions; a non-standard autoload or module registry can conflict with existing app/Modules structure. |
A composite score of ~19.8 with opportunity at ~45 reads correctly: real gap in the market (Laravel lacks a first-class, API-first localization surface), immature artifact. Opportunity without maturity is a build-vs-buy signal, not an adoption signal.
Key questions (to answer before any commitment)
LICENSE file, and has legal confirmed derivative-work and redistribution rights?laravel/framework, php, and liberusoftware/localization-core does composer.json require — and is the constraint a caret or an exact pin?Accept-Language parsing, header precedence, per-tenant override, fallback chain order?Stack fit
Assume Laravel 10/11/12 on PHP 8.1+, Composer 2, and either standard app/ layout or a module loader. Fit is conditional:
lang/ files — moderate fit. You gain an API surface but inherit an opinionated resolution model that may not match your current __() behavior.Migration path
Do not rip out an existing localization stack. Instead, insert an anti-corruption layer:
LocaleResolver / TranslationRepository interfaces in application code.localization-core).If you are currently on mcamara/laravel-localization (URL-prefix routing) or spatie/laravel-translatable (model attribute translation), recognize these solve different problems. This package is an API surface, not a routing or Eloquent concern; a like-for-like migration does not exist, so scope the work as additive rather than replacement.
Compatibility
composer.json ("x.y.z", not "^x.y"). Future-dated releases make semver untrustworthy; caret ranges will silently pull breaking changes./api prefix and global middleware stack (auth, throttle, CORS). Adapters commonly assume api middleware group membership.config/localization.php.Sequencing
| Phase | Duration | Exit criteria |
|---|---|---|
| 0. Legal + license clearance | 1–2 weeks | Written approval, or hard stop |
| 1. Source audit (read core + adapter, map the API contract) | 2–3 days | Contract documented internally; no surprises in controllers |
| 2. Spike in disposable branch, one endpoint | 1 week | Endpoint serves correct locale with documented fallback behavior |
| 3. Anti-corruption wrapper + contract tests | 1–2 weeks | Wrapper passes tests independent of package internals |
| 4. Pilot in one non-critical surface | 2–4 weeks | Error rate and p95 latency within SLO |
| 5. Go/no-go on broader adoption or fork | — | Decision recorded, with fork budget pre-approved |
Budget for a fork from day one. Given zero dependents, you are almost certainly the first production consumer, and the fork is the realistic steady state.
Maintenance
The dominant ongoing cost is ownership transfer: expect to vendor or fork within 6–12 months. Practical mitigations:
Support
There is no vendor, no SLA, and no community to escalate to. Support is entirely internal. Realistically you need one engineer who has read the source end-to-end and can be the named owner. That person is a single point of failure — document the contract they hold in a runbook, not in their head.
Scaling
Localization reads are overwhelmingly read-heavy and highly cacheable, which is favorable. Watch for:
locale × namespace × tenant can explode; namespace your keys and set explicit TTLs.Accept-Language + Vary.If the core hits a database per request, that is the scaling ceiling; verify before pilot.
Failure modes
| Failure | Symptom | Mitigation |
|---|---|---|
| Upstream abandonware | No security patches; Laravel major upgrade blocked | Pre-approved fork budget; internal mirror |
| License challenge post-adoption | Legal order to remove | Clear at Phase 0; isolate behind wrapper so removal is a swap, not a rewrite |
| Silent locale fallback | Users see English where translation exists | Contract tests asserting fallback order; log resolved locale per request |
| Route/middleware collision | 404s or auth applied to public locale endpoints | Register under explicit prefix; integration test on full route list |
Breaking change on composer update |
Runtime errors in prod | Exact pin; no auto-merge; staging-first deploys |
| Cache stampede on deploy | Latency spike, DB saturation | Jittered TTL, warm-up job, Redis-backed cache |
Malformed Accept-Language handling |
500s from fuzzed headers | Input validation at the edge; fuzz test the parser |
Ramp-up
Code volume is likely small, so reading it is fast — a day or two. The expensive part is the absence of documentation: engineers must infer the API contract from controllers and tests, and every inference is a potential production bug. Expect 3–5 engineer-days to first confident contribution, versus roughly half a day for a well-documented equivalent (e.g., a spatie package).
Onboarding artifacts you must create yourself, and should treat as deliverables of Phase 1–3:
docs/localization-api.md capturing the request/response contract..http collection or OpenAPI stub for the endpoints.TPM recommendation: Do not adopt on the strength of this package alone. Its opportunity signal is genuine — Laravel has no dominant API-first localization surface — but a NOASSERTION license plus zero dependents plus anomalous release metadata is a stop-the-line combination. Sequence as: legal clearance → source audit → isolated spike behind an anti-corruption wrapper → pilot. If legal does not clear it in Phase 0, treat the 45-point opportunity score as a build argument rather than a buy argument, and scope a 4–6 week internal adapter over your existing translation store instead.
How can I help you explore Laravel packages today?