skills/nextjs/SKILL.md
Next.js App Router setup guide for Better Translate routing, server helpers, and optional React hooks.
npx skillsauth add jralvarenga/better-translate nextjsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
documentation
Repository map for finding Better Translate packages, docs, and examples.
tools
Snapshot of the current public Better Translate package and adapter surface.
documentation
Right-to-left locale configuration guide for Better Translate.
development
React and Expo integration guide for Better Translate providers, hooks, and typed translation access.