Brandfine Docs
Concepts

Locales

BCP47 locale codes, default-locale fallback, hreflang.

Each workspace declares a set of BCP47 locale codes it serves and one default locale. Posts pin to one locale at a time; translation groups tie locale variants of the same article together.

How locale routing works

Two conventions for URLs:

  • Default locale = bare path. defaultLocale: 'en'/about, /services/uk-eta.
  • Non-default locales = prefixed. pt/pt/about, /pt/services/uk-eta.

The SDK provides localizePath and stripLocalePrefix helpers that do this conversion for you.

The fallback chain

When a consumer requests a post in a locale that doesn't have a translation, the SDK's navigation resolver falls back to the default-locale URL automatically. Custom URL items in navigations behave the same way.

Hreflang

The /external/posts/:slug response includes a translations: [{ locale, slug }] array — every published sibling of the requested post. Use this to render hreflang alternates without a second API call.

On this page