Bosca / BML

Email & localization

One language. Every locale.

BML uses the same published language on server-rendered pages, inside client islands, and in transactional email. Visitors get the right locale; recipients get reliable HTML and plain text; your team manages the words and template versions in Bosca.

Locale-aware by default

Resolve once. Render everywhere.

Bind a BML application to a Bosca localization project and its source, default, and target languages become the application's catalog. BML negotiates the request locale, loads published strings, and uses the same messages during server rendering and client work.

  • A URL override, remembered locale, and the browser's language preferences are considered in order.
  • Language matching follows the browser standard, so a regional locale can fall back to its supported language.
  • Plural messages use CLDR rules through the same translation helper on the server and client.
  • The last good catalog stays available while a fresh one loads.
locale negotiation
URL?lang=fr-CAfirst
Cookiebml_localenext
BrowserAccept-Languagenext
resolved · fr-CA → fr

A first-class email target

Write the message. BML makes it deliverable.

An email template declares its key and subject alongside familiar BML markup. At render time Bosca chooses the recipient's locale and produces the two formats delivery systems need: email-safe HTML and a clean plain-text alternative.

  • CSS is inlined so the design survives restrictive inbox clients.
  • Template images become attached content IDs instead of fragile remote dependencies.
  • Email excludes client JavaScript while keeping server-side data, components, and localization.
receipt.bml
<email key="order.receipt">
  <subject>{ t("receipt.subject") }</subject>
  <style>
    .total { font-weight: 700; }
  </style>

  <h1>{ t("receipt.thanks") }</h1>
  <p class="total">{ order.total }</p>
  <img src="./logo.png" alt=""/>
</email>

Preview and release

Change the template, not the application.

Compiled email templates are versioned Bosca artifacts. Preview a template in Studio with a payload, recipient, locale, and version; then activate a verified build without redeploying the service that sends it.

Preview real variants

Choose the project, template, version, payload, recipient, and locale before the message reaches an inbox.

Versioned and verified

Each compiled template carries a digest, so Bosca verifies the artifact before it becomes active.

Safe hot swap

An activated version swaps in atomically, with the bundled template available as a dependable fallback.

Keep exploring

More on BML