i18n

i18n is a cursor rule for Cursor from s0vers/next-app-i18n-starter. It costs 0 tokens per session (392 once invoked), scanned A, original, MIT.

A set of project rules for supporting multiple languages and regional settings in a web application.

In plain words
What is it for?
Use it when adding locales, translation keys, navigation, server or client translations, currency, time zones, or language-specific metadata.
Why use it?
It prevents broken translations, inconsistent language-aware links, and incorrect currency or time-zone handling.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding locales, translation keys, navigation, server or client translations, currency, time zones, or language-specific metadata.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/s0vers/next-app-i18n-starter/i18n
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/s0vers/next-app-i18n-starter

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for i18n

README.md
[![agentmods](https://agentmods.dev/badge/rules/s0vers/next-app-i18n-starter/i18n.svg)](https://agentmods.dev/rules/s0vers/next-app-i18n-starter/i18n)
Your own site
<a href="https://agentmods.dev/rules/s0vers/next-app-i18n-starter/i18n"><img src="https://agentmods.dev/badge/rules/s0vers/next-app-i18n-starter/i18n.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 392 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00392
Opus 5 $0.00000 $0.00196
Sonnet 5 $0.00000 $0.00078
Haiku 4.5 $0.00000 $0.00039

Measured 8d ago against content hash 0cdac1b79bb2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

i18n scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/i18n.mdc · 41 lines

What it actually says

Internationalization

Routing (src/i18n/routing.ts)

  • Locales: en, ar, zh, es, ja — default en, localePrefix: "as-needed".
  • English URLs have no prefix (/ not /en). Add locales in src/i18n/locales.ts only (localeConfig); routing, regional, OG, and switcher derive from it.
// ✅ Use
import { Link, useRouter, usePathname, getPathname } from "@/i18n/navigation";

// ❌ Avoid for locale-aware routes
import Link from "next/link";
import { useRouter } from "next/navigation";

Dictionaries (dictionary/{locale}.json)

  • en.json is the type source of truth (global.d.tsIntlMessages).
  • Adding a key to en.json requires the same key in every locale file.
  • Namespaces in use: Index, Footer, Metadata, Localization — add new namespaces to all files.

Request config (src/i18n/request.ts)

  • Currency and timezone come from src/i18n/regional.ts per locale — no user override dropdowns.
  • Messages loaded via dynamic import: dictionary/${locale}.json.

Components

  • Server: setRequestLocale(locale) + getTranslations({ locale, namespace }).
  • Client: useTranslations, useFormatter, useTimeZone, useNow from next-intl.
  • Proxy: src/proxy.ts (Next.js 16 locale middleware) — do not recreate as middleware.ts.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 41 lines · 0 tokens per session scan A 0cdac1b79bb2

Subscribe to this mod's changes

i18n is a cursor rule published in the GitHub repository s0vers/next-app-i18n-starter (64 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 392 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.