aymericzip/intlayer-skills/intlayer-backend

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 Node.js / Bun backends (Express, Fastify, Hono, NestJS, AdonisJS, Elysia, HTMX). Use when the user asks to "translate API responses", "setup server-side i18n", register the Intlayer middleware, or use "t" / "getIntlayer" in a route handler.

Install

npx vskill@latest install aymericzip/intlayer-skills/intlayer-backend

SKILL.md

Intlayer Backend Usage

Core Philosophy

Every backend integration works the same way:

  1. A middleware / plugin (intlayer()) resolves the locale of each request (cookie, header, Accept-Language) and scopes it to that request.
  2. Helpers (t, getIntlayer, getDictionary) read that request locale, so they are safe to call from services without threading a locale argument through every function.
FrameworkPackageRegistration
Expressexpress-intlayerapp.use(intlayer())
NestJSexpress-intlayerconsumer.apply(intlayer()).forRoutes("*")
Fastifyfastify-intlayerawait fastify.register(intlayer)
Honohono-intlayerapp.use("*", intlayer())
Elysiaelysia-intlayer.use(intlayer()), helpers read from route intlayer
AdonisJSadonis-intlayerRegistered middleware (see the AdonisJS guide)
Declare Content

File: src/index.content.ts

typescript
import { t, type Dictionary } from "intlayer";
const content = {
key: "index",
content: {
exampleOfContent: t({
en: "Example of returned content in English",
fr: "Exemple de contenu renvoyé en français",
}),
},
} satisfies Dictionary;
export default content;

Usage

Register the middleware / plugin from the table above before the routes that read content (see the Express guide), then call the helpers in any handler:

typescript
import { t, getIntlayer, getDictionary } from "express-intlayer";
import dictionaryExample from "./index.content";
app.get("/", (_req, res) => {
res.send(t({ en: "Hello", fr: "Bonjour" })); // Inline translation
});
app.get("/by-key", (_req, res) => {
res.send(getIntlayer("index").exampleOfContent); // Dictionary by key
});
app.get("/by-import", (_req, res) => {
res.send(getDictionary(dictionaryExample).exampleOfContent); // Imported dictionary
});

The same helpers are exported by fastify-intlayer, hono-intlayer and adonis-intlayer. On Elysia, read them from the route context: ({ intlayer }) => intlayer!.getIntlayer("index").

For jobs, queues or emails (no incoming request), resolve content for the recipient's stored locale: getIntlayer("index", user.locale).

References

Environments
Concepts
Packages

Security

  • Security scanPassed, 100 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-backend/badge)](https://verified-skill.com/skills/aymericzip/intlayer-skills/intlayer-backend)

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