Store Console

Unified Frontend & Mobile Translations API

Unified Frontend & Mobile Translations API

The platform exposes one shared translation contract that works for both Inertia pages and mobile apps.

Endpoint

  • GET /api/translations for web/mobile clients
  • GET /locale/translations for authenticated web flows

Query Parameters

  • locale: primary locale (example: en)
  • locales: comma-separated locales for multi-locale payloads (example: en,bn,ar)
  • namespaces: comma-separated namespaces (example: platformkit,accounting)
  • module or modules: infer namespaces by module name(s)
  • path or page: infer namespaces by page route (example: admin/system/accounting/reports)

Response Shape

{
  "locale": "en",
  "locales": ["en", "bn"],
  "namespaces": ["platformkit", "accounting"],
  "translations": { ...primary locale payload... },
  "translations_by_locale": {
    "en": { ... },
    "bn": { ... }
  }
}

How Inertia Uses It

Inertia pages receive translation meta (locale + namespaces) and lazy-load actual translations from /api/translations. Responses are cached in session storage to reduce repeat requests.

How Mobile Uses It

Mobile apps can request all required namespaces and locales in a single request, then cache translations_by_locale locally for offline and fast screen rendering.

Best Practices

  • Always request only required namespaces per screen/module.
  • Use locales when preloading language packs at app boot time.
  • Fallback to en is automatic when a locale file does not exist.
Last updated: 7/20/2026
Store Console

The complete, AI-powered commerce & ERP platform built for startups. Self-hosted, modular, and yours to own.

[email protected]+8801816366535
House 32, Road 29, Mirpur 12, Dhaka, Bangladesh

© 2026 Store Console. All rights reserved.