aymericzip/intlayer-skills/intlayer-next-js

Claude Code and agent skill by aymericzip/intlayer-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Integrates Intlayer internationalization with Next.js App Router and Pages Router. Use when the user asks to "setup Next.js i18n", use "useIntlayer" in Server Components, or handle client-side translations in Next.js.

Install

npx vskill@latest install aymericzip/intlayer-skills/intlayer-next-js

SKILL.md

Intlayer Next.js Usage

Core Philosophy

Intlayer promotes Component-Level Content Declaration. Instead of a massive global translation file, content is declared in *.content.ts files adjacent to the Next.js components that use them.

Workflow

To create a translated component, you need two files:

  1. Declaration: A content file (e.g., myComponent.content.ts) defining the dictionary.
  2. Implementation: A Next.js component (Server or Client) using the useIntlayer hook.
1. Declare Content

Create a content file using t() for translations. File: src/components/MyComponent/myComponent.content.ts

typescript
import { t, type Dictionary } from "intlayer";
const content = {
// The 'key' must be unique and matches what you pass to useIntlayer()
key: "my-component",
content: {
text: t({
en: "Welcome",
fr: "Bienvenue",
es: "Hola",
}),
},
} satisfies Dictionary;
export default content;

Setup

Provider

Mount one IntlayerProvider (from next-intlayer/server) in the [locale] layout. It serves both server and client components, so pages don't wrap themselves (see the Next.js guide).

useIntlayer Hook

next-intlayer is isomorphic: the same useIntlayer import works in Server Components and in "use client" components.

tsx
import { useIntlayer } from "next-intlayer";
export const MyComponent = () => {
const content = useIntlayer("my-component");
return <h1>{content.text}</h1>;
};

Next.js package Documentation

Compiler

The Intlayer Compiler can extract all your content keys from your components, using one CLI command (npx intlayer extract) or automatically at app build.

References

Environments
Concepts
Packages

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/aymericzip/intlayer-skills/intlayer-next-js/badge)](https://verified-skill.com/skills/aymericzip/intlayer-skills/intlayer-next-js)

Something wrong with this skill or its page? Tell us.