the owning package id, e.g. '@sheetxl/sdk'
OptionalfromUrl: string
import.meta.url of a module inside pkg. Ignored in the browser; in node it is
how the package locates its own locales/ on disk when no root supplies them.
OptionaldefaultMessages: MessageCatalog
the package's bundled default-language (en) catalog, statically imported
by the caller so the bundler inlines it. Registered eagerly as the lowest-precedence
floor (see DefaultLanguagePackService.registerDefaultMessages) so a plain
npm install renders correctly with nothing served; fetched packs still layer on top.
When present, an empty resource search is the healthy zero-config state, not a warning.
Register a package's call-site (
t()) message slices for every locale it ships — the framework-free counterpart ofCommandCatalogService.registerFromManifest(which additionally seeds command catalogs and therefore lives inutils-react).For a package that owns only
messages.json— the SDK, whose strings are model-layer text rather than command chrome — this is the whole story: read the package index ({ locales: [...] }), then each<locale>/manifest.json, and hand the messages file to DefaultLanguagePackService as a lazy loader (slices merge per language, so the SDK and the UI packages coexist).Never rejects, but it does WARN. Resources load through the platform-conditional fetchLocaleResourceAll boundary — an HTTP fetch in the browser, a disk read in node. A failure leaves the pack unregistered and every
t(key)renders its KEY, so the failure is visible in the UI but silent in the console without this warning.Every resource root contributes, rather than the first one winning outright: manifests are unioned so a user root can add a locale the package does not ship, and a locale's message files are merged (highest-precedence root last, so it wins per key) so a root can override a handful of keys without restating the catalog.