logo hsb.horse

Architecture Decision Record

PWA manifest i18n strategy

Generate locale-specific manifests with localized lang/name/short_name.

Accepted #pwa #i18n

PWA manifest i18n strategy

Decision

  • Generate manifest.{locale}.webmanifest for each locale using Astro endpoints
  • Each manifest varies lang, name, and short_name by locale
  • Favicon.astro references the locale-aware manifest

Context

The site supports 6 locales (ja, en, ko, fr, de, pt), but the manifest was fixed to lang: "ja". To provide proper PWA experience, we need locale-specific manifests.

Rationale

  • PWA best practices require manifest lang to match the page language
  • App name (name, short_name) should display appropriately in each language
  • Astro endpoint generation works with static hosting environments

Consequences

  • Manifests are generated as /brand/manifest.{locale}.webmanifest
  • Favicon.astro references the appropriate manifest based on page locale
  • Adding new locales requires updating src/pages/brand/manifest.[lang].webmanifest.ts