Appearance
SSR & server-rendered apps
Render translated HTML on the server with @stringpush/node. Staging overlay stays in the browser via @stringpush/sdk.
Install
bash
pnpm add @stringpush/node @stringpush/runtime-coreServer t()
ts
import { createServerRuntime } from "@stringpush/node";
const runtime = await createServerRuntime({
applicationId: "<uuid>",
environment: "staging",
locale: "en",
apiKey: "trt_…",
apiBaseUrl: "https://api.platform.stringpush.com",
origin: "https://app.example.com", // public allowlisted origin
});
const title = runtime.t("home.title");Next.js
Use createServerRuntime() in Server Components. Mount @stringpush/react in a client layout for overlay. See Next.js.
Other server stacks (Rails, Laravel, Phoenix, Django)
Node/TypeScript SSR uses @stringpush/node. For Ruby, PHP, Python, Elixir, Go, or Java, implement a thin client over manifest + bundle HTTP — see Build your own server HTTP client.
Alternatives
- SPA / no SEO requirement:
@stringpush/sdkonly - Locale files in Git (Gettext, i18next): Git sync