一键导入
nextjs
Next.js App Router setup guide for Better Translate routing, server helpers, and optional React hooks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Next.js App Router setup guide for Better Translate routing, server helpers, and optional React hooks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Extract source strings, generate locale files, and remove unused keys for Better Translate projects.
Expo and React Native integration guide using Better Translate React support.
React and Expo integration guide for Better Translate providers, hooks, and typed translation access.
Package map and reading order for Better Translate product skills.
Guide for combining Better Translate packages without duplicating translation ownership.
Smallest Better Translate setup for plain TypeScript, Node.js, Bun, APIs, and shared libraries.
| name | nextjs |
| description | Next.js App Router setup guide for Better Translate routing, server helpers, and optional React hooks. |
Use this guide when the app is a Next.js App Router app.
@better-translate/core@better-translate/nextjs@better-translate/react for client-side hooks and providersThe smallest practical Next.js setup usually has these files:
src/lib/i18n/config.tssrc/lib/i18n/routing.tssrc/lib/i18n/request.tssrc/lib/i18n/server.tssrc/lib/i18n/navigation.tssrc/proxy.tsconfig.ts creates the core translatorrouting.ts defines the locale route shaperequest.ts exposes the translator to the Next.js adapterserver.ts creates request-aware helpers like getTranslations()navigation.ts creates locale-aware links and router helpersproxy.ts redirects requests into locale-prefixed URLsCreate and export the typed core translator once, then let the Next.js adapter and optional React hooks read from it.
useTranslations<typeof translator>()Do not replace the core package with the Next.js package.
Next.js depends on the translator you created in @better-translate/core.
Add @better-translate/react only when client components need:
useTranslations()If you add React hooks, use the same exported translator type that the rest of the app uses so key and locale autocomplete stay aligned.