agentleFS
UwayxtUwayxt/agent-skills/.agents/skills/i18n-localization-strategy/SKILL.md

i18n-localization-strategy

Skill4 starsChanged 3 months agoMITView on GitHub

Define internationalization, RTL layout, translation tokens, and locale formatting. Use when i18n, localization, RTL, multi-language, translation, or locale support.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never hardcode strings in UI templates.

    line 9
  2. Distinctive:

    Avoid hardcoded component widths on buttons, badges, and table headers.

    line 16
  3. Distinctive:

    Use auto-layout, flexible grids, and multi-line wrapping where appropriate.

    line 17
  4. Distinctive:

    Ensure buttons and cards do not clip text when strings expand by 40%.

    line 18
  5. Very specific:

    CSS Logical Properties: Use margin-inline-start, padding-inline-end, inset-inline, and text-align: start instead of hardcoded left and …

    line 22
  6. Very specific:

    Never concatenate sentences with inline variables ("You have " + count + " items" is untranslatable).

    line 29
  7. Very specific:

    Use standard Intl.DateTimeFormat and Intl.NumberFormat APIs.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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 is a layout architecture challenge — translated text changes length by up to 40%, writing direction flips completely in RTL, and date/currency formats follow strict regional standards.

1. Structure semantic translation token keys

Never hardcode strings in UI templates. Organize string tokens with namespaced dot-notation:

  • auth.login.title -> "Sign In to Your Workspace"
  • dashboard.metrics.revenue.label -> "Monthly Recurring Revenue"
  • common.actions.save -> "Save Changes"

2. Design for text expansion and variable length

Languages like German, French, and Indonesian can be 20–40% longer than English; Chinese and Japanese are more compact:

  • Avoid hardcoded component widths on buttons, badges, and table headers.
  • Use auto-layout, flexible grids, and multi-line wrapping where appropriate.
  • Ensure buttons and cards do not clip text when strings expand by 40%.

3. Architect Right-to-Left (RTL) directional layout

For Arabic, Hebrew, and Persian locales, the visual flow flips horizontally:

  • CSS Logical Properties: Use margin-inline-start, padding-inline-end, inset-inline, and text-align: start instead of hardcoded left and right.
  • Directional Icons: Flip forward/back arrows, breadcrumb chevrons, and progress bars.
  • Do NOT flip: Media playback controls, telephone numbers, code blocks, or universal brand logos.

4. Handle pluralization and complex interpolation

Plural rules vary dramatically across languages (English has 2 plural forms: 1 item vs 2 items; Arabic has 6 grammatical plural forms):

  • Structure messages with ICU MessageFormat or standardized plural keys: zero, one, two, few, many, other.
  • Never concatenate sentences with inline variables ("You have " + count + " items" is untranslatable).

5. Standardize date, time, number, and currency formatting

  • Use standard Intl.DateTimeFormat and Intl.NumberFormat APIs.
  • Format currencies with correct ISO codes and regional symbol placements ($100.00 vs 100,00 € vs Rp 100.000).
  • Store timestamps in UTC (ISO 8601) and format locally on client devices.

Completion Criteria

  • Dot-notated translation token hierarchy established
  • Components tested for 40% text expansion without truncation or overlap
  • CSS logical properties (*-inline-*) defined for bi-directional RTL support
  • ICU MessageFormat or pluralization rules structured for dynamic counts
  • Regional number, currency, and date formatting standards documented

Output

An i18n-architecture-guide.md and translation schema template specifying namespace conventions, RTL logical styling rules, and locale formatting standards.

Anti-patterns

  • Hardcoding margin-left or text-align: right (breaks RTL flip).
  • String concatenation with inline variables instead of parameterized translation strings.
  • Assuming English singular/plural rules apply to all languages.
  • Setting fixed pixel widths on buttons or labels that clip translated copy.

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.