ReadonlylocaleThe BCP 47 tag this localizer formats in.
ReadonlylocalesEvery supported tag, the default first.
Returns a localizer bound to another SUPPORTED locale.
Callers pass configuration (a resolved request locale, a user's stored preference already matched against the supported set), never raw user input, so an unsupported tag is a programming error and throws.
A tag from ILocalizer.locales
A localizer bound to tag
Looks up key in this localizer's locale and formats it with values.
A key absent from every catalogue answers the key itself (and is logged once), unless the implementation was configured to throw — a request never fails over a translation gap by default.
The message key
Optionalvalues: Readonly<Record<string, unknown>>
Placeholder values; a plural message requires a finite
numeric count
The formatted text
Localization contract — looks up and formats messages for one locale.
Registered under
CAPABILITIES.LOCALIZATION('localization'), bound to the application's default locale. A request-bound view comes fromILocalizer.forLocalewith the request's resolvedIRequest.locale, which is what the localization plugin'slocalizerFor(ctx)does.Formatting substitutes text and escapes NOTHING: escaping belongs to the runtime that renders the result (the JSX runtime, the
htmltagged template), exactly as forIViewEngine.render.Example
Since
0.9.0