Example apps
Runnable example apps — one per framework — all demonstrating the same feature set: init
- a language switcher, both
<I18nKeylessText>/<T>andgetTranslation, thereplaceandcontextoptions, two pages for client navigation, and (for SSR apps) server-rendered translated HTML via?lang=enwith flash-free hydration.
Each example ships a passing test suite and runs offline against a bundled mock backend — no API key needed.
Base: github.com/arnaudambro/i18n-keyless/tree/main/examples
| Example | Framework | Mode | Demonstrates |
|---|---|---|---|
vite-react | Vite + React | SPA | Baseline: init, storage, <T>, getTranslation, switcher. |
tanstack-start | TanStack Start | SSR + SPA | Both paths: <I18nKeylessProvider> via root loader (component) + runWithI18nKeyless in loaders / head() (function). Requires ≥ 2.3.2. |
remix-rr7 | Remix / React Router 7 | SSR | runWithI18nKeyless in entry.server; both paths resolve from the ALS. |
nextjs | Next.js (App Router) | SSR | Server layout fetches translations → <I18nKeylessProvider> client boundary. |
astro | Astro + React islands | SSR | Island + <I18nKeylessProvider> with serialized props. |
node | Node.js (no React) | server | i18n-keyless-node + awaitForTranslation. |
react-native | React Native (CLI) | native | MMKV / AsyncStorage adapter. |
expo | Expo Router | native | Expo storage + router. |
Run any of them
cd examples/<name>
cp .env.example .env # leave the API key empty to run offline
npm install
npm run dev
To try it fully offline, leave API_KEY empty in .env and run examples/_mock-server
alongside it — no real API key required.
Which one to copy
Match the example to your stack, then read the matching SSR framework guide for the why behind each step — especially TanStack Start, where the two-paths model actually bites.