Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spairehq.com/llms.txt

Use this file to discover all available pages before exploring further.

Spaire renders checkout in the customer’s language automatically. You can also override the language explicitly — useful when your app already knows the customer’s locale or you want a consistent experience for a specific market.

Supported locales

Locale codeLanguage
enEnglish
deGerman
esSpanish
frFrench
huHungarian
itItalian
nlDutch
ptPortuguese (Brazil)
pt-PTPortuguese (Portugal)
svSwedish

Set locale on a checkout session

Pass the locale field when creating a checkout session from your backend:
import { Spaire } from '@spaire/sdk'

const spaire = new Spaire({
  accessToken: process.env.SPAIRE_ACCESS_TOKEN,
})

const checkout = await spaire.checkouts.create({
  products: ['<product_id>'],
  locale: 'fr',
})

What gets translated

When a locale is set, Spaire translates all checkout UI text — form labels, button text, error messages, and helper text. Customer-provided content (product names, descriptions, benefit names) is not translated and displays as entered.

Automatic detection

If you don’t set a locale, Spaire attempts to detect the customer’s preferred language from their browser’s Accept-Language header. If the detected language isn’t supported, checkout defaults to English. For the most consistent experience in a known-locale context — such as a localized marketing page or an app with language settings — set the locale explicitly rather than relying on auto-detection.

What’s next

Checkout Sessions

Set locale and other session parameters from your backend.

Embedded Checkout

Embed localized checkout in your own page.