Fluixi Docs

Internationalization

Fluixi ships built-in i18n. createI18n gives you a reactive, SSR-correct translator:

import { createI18n } from '@fluixi/core/i18n';

const i18n = createI18n({
  locale: 'en',
  locales: ['en', 'fr'] as const,
  messages: { en: { hello: 'Hello, {name}' }, fr: { hello: 'Bonjour, {name}' } },
});

export const { t, locale, setLocale } = i18n;

t('hello', { name: 'Ada' }); // "Hello, Ada"

Typed keys & pluralization

t('…') autocompletes the keys from your messages. Pluralization uses Intl.PluralRules; numbers and dates use Intl.NumberFormat / Intl.DateTimeFormat.

Auto-discovery

Put translations in src/i18n/<locale>.json and @fluixi/start exposes them as virtual:fluixi-i18n — typed off the JSON, so keys flow straight into createI18n.

SSR

The active locale is request-scoped on the server and a reactive signal on the client, and it's seeded into the page so the first client render matches — no flash, no mismatch.

That wraps up the v1 guide. Explore the reactive core live in the Playground.