agentleFS
dafaalzdafaalz/agent-skills/skills/i18n/SKILL.md

i18n

Skill2 starsChanged 2 months agoMITView on GitHub

Use when implementing internationalization, localization, locale negotiation, date/number formatting, ICU messages, or RTL/BiDi layouts. Don't use for single-language text editing or translation of prose.

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oss-pr, pr-automation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • volovelySkill

    pr-fix

    This skill should be used when the user asks to "fix PR comments", "address PR feedback", "resolve PR comments", provides a GitHub PR URL with intent to fix, or says "pr-fix". It reads all review comments on a PR, decides which need code fixes vs. replies, makes the fixes, and posts replies — all with explicit user approval before any GitHub action.

    Also in 3 projects that use this

  • conorluddySkill

    state-management

    Cache management, configuration best practices, and progressive disclosure patterns for efficient context window usage. Use when working with large responses, optimizing token costs, or managing plugin state across operations.

    Also in 4 projects that use this

  • MicrosoftSkill

    bump-version

    Bump the VoxelPic version to a user-specified value. USE FOR: setting or updating the project version across all files that embed it. Applies to requests like 'bump version to X.Y.Z', 'set version', or 'update version'.

    Also in 4 projects that use this

  • Svenja-devSkill

    e2e-testing

    Also in 5 projects that use this

  • +2 more from CES-Ltd

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the target language set is ambiguous, ask the user before implementing.

    line 25
  2. Distinctive:

    Verify work against concrete criteria:

    line 101

“Common” is measured: kept by at least 6 in 10 of the 24 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

Internationalization (i18n)

Make a codebase correct outside a single locale. This skill audits and implements internationalization across nine domains documented in reference modules under references/.

Scope contract

The user may narrow the work by naming aspects, languages, or both. Parse the request before modifying files:

RequestLanguages in scopeDomains in scope
Bare /i18nDetect from project, ask if ambiguousAll nine
/i18n languages en, esen, es onlyAll nine
/i18n dates onlyCurrent setintl-date-and-time-format.md only
/i18n add ArabicExisting plus arAll nine, RTL and BiDi prioritized
/i18n audit onlyDetect from projectAll nine, audit report without edits

Rules for narrowed requests:

  1. A narrowed language set narrows configuration, not code correctness. If only en and es are requested, use logical CSS properties, locale-aware formatting APIs, and ICU messages so future locales require only configuration changes.
  2. A narrowed domain set does not excuse breaking sibling domains. Note out-of-scope defects in findings without fixing them unless the user expands the scope.
  3. When the target language set is ambiguous, ask the user before implementing.

Workflow

Step 1. Stack and inventory reconnaissance

Audit the repository to detect existing i18n tooling before adding dependencies:

ls -la
head -n 60 package.json pyproject.toml composer.json Gemfile go.mod 2>/dev/null
grep -rIl --exclude-dir={node_modules,.git,dist,build,vendor} -E "i18next|react-intl|vue-i18n|next-intl|formatjs|gettext|babel|lingui|MessageFormat" . | head -n 30
find . -path ./node_modules -prune -o \( -name "*.po" -o -name "*.xliff" -o -name "*.arb" -o -name "*.ftl" -o -name "messages*.json" -o -name "locales" -o -name "i18n" \) -print 2>/dev/null | head -n 30

Record runtime capabilities, existing catalog locations, translation formats, and user locale persistence sources. Extend existing libraries instead of introducing competing frameworks.

Completion criterion. A verified inventory listing the runtime, active i18n libraries, catalog paths, and locale storage strategy.

Step 2. Progressive disclosure and domain module loading

Consult only the reference modules relevant to the scoped domains:

DomainReference moduleLoad condition
Language tags and locale negotiationreferences/intl-language.mdAlways loaded. Defines tag vocabulary and negotiation.
Dates, times, time zones, calendarsreferences/intl-date-and-time-format.mdTimestamps rendered, parsed, or stored.
Numbers, currencies, unitsreferences/intl-number-and-currency.mdMoney, counts, percentages, or measurements displayed.
Bidirectional text and RTL layoutreferences/intl-bidi.mdRTL language in scope or physical CSS directions found.
Pluralization, gender, ICU messagesreferences/intl-pluralization.mdStrings interpolate counts or variables.
Collation, sorting, comparisonreferences/intl-collation-and-sorting.mdLists sorted, searched, or deduplicated.
Unicode text processingreferences/intl-text-processing.mdStrings truncated, sliced, or case-folded.
Content, catalogs, assetsreferences/intl-content-and-assets.mdAlways loaded. Governs catalog layouts and expansion.
Localization testing and QAreferences/intl-testing-and-qa.mdAlways loaded. Verifies pseudolocales and gates.

Completion criterion. Relevant domain reference files loaded into session context based on user scope.

Step 3. Audit and severity classification

Scan for locale-hardcoded patterns and catalog findings:

grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "toLocaleDateString\(\)|toLocaleString\(\)|new Date\(.*\)\.getDate\(\)" . | head -n 30
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "\.toUpperCase\(\)|\.toLowerCase\(\)" . | head -n 30
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "=== *1|=== *0|count *[<>=]+ *1|\$\{count\}" . | head -n 30
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "margin-left|margin-right|padding-left|padding-right|text-align:\s*(left|right)|left:|right:" . | head -n 30
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "\.sort\(\)|ORDER BY" . | head -n 30

Classify each finding by impact:

SeverityDefinitionExamples
CriticalCorrupts data or alters calculation valuesStoring local wall-clock time as UTC instant, parsing localized currency with parseFloat, slicing strings across grapheme boundaries
HighVisibly broken UI or grammar for target localeHardcoded count === 1 plural checks, code-unit string sorting, unlocalized dates rendered in server timezone
MediumPrevents subsequent locale onboardingPhysical CSS margins and padding, concatenated sentence fragments, fixed date format strings
LowCompleteness and polish gapsMissing inline lang tags, absent pseudolocale testing builds in CI

Completion criterion. A written findings table identifying file locations, line numbers, defect categories, and planned remediation.

Step 4. Ordered implementation

Execute changes in strict architectural sequence:

  1. Locale model. Define how locales are negotiated, stored, and resolved across boundaries.
  2. Catalog structure. Establish message files, keying conventions, and interpolation tokens.
  3. String extraction. Replace hardcoded copy with catalog keys and named parameters.
  4. Formatting. Replace ad-hoc date and number formatters with standard platform APIs or library formatters.
  5. Plurals and grammar. Convert count-dependent logic to ICU plural messages with CLDR categories.
  6. Layout and BiDi. Switch physical CSS properties to logical equivalents, setting dir attributes where required.
  7. Collation. Replace code-unit comparisons with locale-aware collator calls.
  8. Testing infrastructure. Add pseudolocale pipelines, lint rules, and matrix test fixtures.

Completion criterion. Code modifications applied in sequence matching repository conventions without unused abstractions.

Step 5. Verification

Verify work against concrete criteria:

  • App builds and automated tests pass.
  • Audited views render all in-scope locales without falling back to default language keys.
  • User-facing paths contain zero raw toLocaleDateString() or new Date().toString() calls without explicit locale options.
  • Numeric conditionals like count === 1 are replaced with ICU plural syntax.
  • String comparisons use Intl.Collator or case folding rather than raw toLowerCase().
  • Layouts employ CSS logical properties (margin-inline-start, padding-inline-end).
  • Pseudolocale tests show zero unextracted raw strings and zero truncated containers.

Completion criterion. Fresh command output confirming clean test runs and zero unresolved audit items.

Common pitfalls

MistakeFailure modeCorrect pattern
Adding libraries before checking repoColliding i18n architectures and duplicate keysAudit dependencies first, extend existing tools
count === 1 conditionalBreaks in Polish, Arabic, and Russian plural rulesICU plural with standard CLDR categories
parseFloat(localizedNumber)German 1.234,56 parses as 1.234Locale-aware numeric parsing or raw numeric storage
Unspecified locale in formattersFalls back to server OS locale in productionPass explicit resolved locale to formatter
Local time stored as instantDaylight saving shifts shift timestamps by an hourStore UTC instant with separate IANA timezone identifier
Physical CSS propertiesLayout fails to mirror in RTL localesUse margin-inline-start and logical properties
Code-unit .sort()Sorts Å, é, and Z incorrectlyUse Intl.Collator(locale).compare
Fragment concatenationBreaks under differing language word ordersSingle message templates with named placeholders
.substring() slicingCorrupts surrogate pairs, emoji, and Indic scriptsUse Intl.Segmenter with grapheme granularity

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.