agentleFS
notum-cznotum-cz/strapi-next-monorepo-starter/.claude/skills/add-locale/SKILL.md

add-locale

Skill316 starsChanged 5 months agoMITView on GitHub

Use when adding a new language/locale to the application — e.g. "add language", "add locale", "new language", "new translation", "internationalization". Touches Strapi admin config, Next.js i18n routing, and translation files.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add a new language/locale across both apps.

    line 8
  2. Distinctive:

    Ask the user for both, then validate before proceeding:

    line 12

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add Locale

Add a new language/locale across both apps. For the full file map and how i18n is wired, see apps/docs/docs/reference/internationalization.md.

Inputs

Ask the user for both, then validate before proceeding:

  • Locale code — ISO 639-1, two lowercase letters (e.g. de, fr, sk). Reject uppercase or invalid codes.
  • Locale name — capitalized, no special characters (e.g. German).

Steps

  1. Translation catalog — Copy apps/ui/locales/en.json to apps/ui/locales/{code}.json. Keep the keys identical; translate the values (or leave English and flag them for translation). Existing catalogs for reference: en.json, cs.json.
  2. Routing — In apps/ui/src/lib/navigation.ts, add {code} to routing.locales, keeping the array alphabetical:

    locales: ["cs", "en", "{code}"],

    This is the only code change. The [locale] segment, generateStaticParams, the dynamic catalog import in apps/ui/src/lib/i18n.ts, and the Locale type (derived from routing.locales in apps/ui/src/types/global.d.ts) all pick up the new locale automatically.

  3. Strapi + content — these are manual; tell the user:

    • Enable the locale: Strapi admin → Settings → Internationalization → Add new locale.
    • Translate localized content for each i18n-enabled content type, plus single types (Navbar, Footer) and any localized seed/demo content.

    See apps/docs/docs/reference/internationalization.md (Creating Localized Content) for details.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.