Skip to content
Skills Library
Programming · Learning & explanation

internationalisation-engineering

/internationalisation-engineering

Engineering practice: Internationalisation and localisation — Externalise every string, format numbers and dates by locale, handle plurals and right-to-left layouts, and prove it with pseudo-localisation, so adding a language is translation work rather than a rewrite. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

Licence
Apache-2.0
Last repository change
02.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 02.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Engineering practice: Internationalisation and localisation — Externalise every string, format numbers and dates by locale, handle plurals and right-to-left layouts, and prove it with pseudo-localisation, so adding a language is translation work rather than a rewrite. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

Original author description

Engineering practice: Internationalisation and localisation — Externalise every string, format numbers and dates by locale, handle plurals and right-to-left layouts, and prove it with pseudo-localisation, so adding a language is translation work rather than a rewrite. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.

How it works

  1. How to do it
  2. Checklist
  3. Rules
  4. Do
  5. Don't
  6. Quality gates
  7. Workflow
  8. Examples
  9. Further reading
Original SKILL.md headings · 82 lines, 909 words
SKILL.md preview
---
name: internationalisation-engineering
description: "Engineering practice: Internationalisation and localisation — Externalise every string, format numbers and dates by locale, handle plurals and right-to-left layouts, and prove it with pseudo-localisation, so adding a language is translation work rather than a rewrite. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it."
type: engineering
stack: practice
core: "1.0"
checked: 2026-10-26
---

# Internationalisation and localisation

Externalise every string, format numbers and dates by locale, handle plurals and right-to-left layouts, and prove it with pseudo-localisation, so adding a language is translation work rather than a rewrite.

Use this from the first user-facing string in any product that may ship in more than one language or region, and when adding a new locale. It prevents hard-coded text, broken grammar from string concatenation, wrong number and date formats, truncated translations and mirrored layouts that fall apart.

## How to do it
1. **Choose a message format and library** — Pick an ICU MessageFormat-compatible library for the stack (for example FormatJS on the web, the platform string catalogues on iOS and Android) and one file per locale. Agree key naming (feature.screen.element) and a source locale.
2. **Externalise every user-facing string** — Move all visible text, accessible labels, error messages, email and notification copy into the message catalogue. Give each message a description for translators explaining where it appears and any length limit.
3. **Use whole messages with placeholders** — Write complete sentences with named placeholders ({name} shared {count} files) instead of concatenating fragments, so translators can reorder words. Never build sentences from separate translated pieces.
4. **Handle plurals and gender with ICU rules** — Use plural and select syntax for every count and gendered phrase; do not hard-code singular and plural with an if statement, because many languages have more than two plural forms.
5. **Format by locale, store neutrally** — Store timestamps in UTC and amounts as integer minor units with a currency code. Format dates, times, numbers, currencies, units and lists with the platform Intl or locale APIs at display time, using the user's locale and time zone.
6. **Support right-to-left** — Set the document or view direction from the locale, use logical layout properties (margin-inline-start, padding-inline-end, start and end alignment) instead of left and right, mirror directional icons, and isolate user-generated text with bidi isolation.
7. **Pseudo-localise in development and CI** — Generate a pseudo-locale that accents characters, expands strings by about 40% and wraps them in markers. Run the app and screenshot tests in it to catch hard-coded strings, truncation and layout breakage before real translation.
8. **Run the translation workflow** — Extract new keys automatically, send them to translators with context and screenshots, fail CI on missing keys for shipped locales, and fall back to the source locale rather than showing raw keys.

## Checklist
- [ ] No hard-coded user-facing strings remain in components
- [ ] Every message has a translator description
- [ ] Plurals and gendered phrases use ICU plural or select
- [ ] Dates, numbers and currencies are formatted with locale APIs
- [ ] Layout uses logical properties and works in a right-to-left locale
- [ ] The app renders correctly in the pseudo-locale with no clipped text
- [ ] CI fails on missing keys for shipped locales

## Rules
- Never concatenate translated fragments to build a sentence; use one message with placeholders. _(Word order and grammar differ between languages.)_
- Format dates, numbers and currency only with locale-aware APIs, never with manual string templates. _(Separators, order and symbols vary by locale.)_
- Components use logical CSS or start/end layout values instead of left and right. _(Right-to-left support then comes from setting one direction attribute.)_
- Do not fix widths to fit English text; allow labels to grow and wrap. _(Translations are often 30–50% longer than English.)_
- Set the lang attribute (or platform locale) on the document and on any inline text in a different language. _(Screen readers choose pronunciation from it.)_

## Do
- Give translators screenshots or a preview link for context
- Keep the source-locale catalogue as the single list of keys
- Test with a long-string locale and a right-to-left locale on every release

## Don't
- Do not put text inside images
- Do not derive the user's language from their IP address alone; respect their chosen setting
- Do not reuse one key for identical English text in different contexts

## Quality gates
| Gate | Tool | Threshold | When |
|---|---|---|---|
| No hard-coded strings | i18n lint rule (for example eslint-plugin-i18next or formatjs/no-literal-string) | 0 literal user-facing strings in components | Every pull request |
| Catalogue completeness | Message extraction and key diff | No missing keys for any shipped locale; pseudo-locale screenshots have no clipping | Every pull request and before release |

## Workflow
**Review**
- Reviewer checks new strings are externalised with descriptions
- Layout changes are checked in a right-to-left locale

**Definition of done**
- Pseudo-locale pass recorded
- New keys extracted and sent for translation

## Examples
### ICU plural message and locale formatting (`src/i18n/messages.en.json`)

```json
{
  "files.shared": {
    "defaultMessage": "{name} shared {count, plural, =0 {no files} one {# file} other {# files}} on {date, date, medium}",
    "description": "Activity feed line; name is a person, date is when they shared"
  },
  "cart.total": {
    "defaultMessage": "Total: {amount, number, ::currency/EUR}",
    "description": "Cart summary total, shown above the pay button"
  }
}
```

## Further reading
- [ICU documentation](https://unicode-org.github.io/icu/) — Message formatting, plural rules and locale data that most i18n libraries build on.
- [FormatJS](https://formatjs.github.io/) — ICU message syntax and Intl-based formatting for JavaScript apps.
- [WCAG standards and guidelines](https://www.w3.org/WAI/standards-guidelines/wcag/) — Language-of-page and language-of-parts requirements.
- [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) — Engineering skills for coding agents covering front-end practices such as localisation.

_Written for Celestial; the sources above inspired it._
Files in this package (4)
  • AGENTS.md 4 KB
  • README.md 2 KB
  • SKILL.md 6 KB
  • rules/internationalisation-engineering.mdc 4 KB

Versions

The database has no other skills named internationalisation-engineering.

Database snapshot: 13.11.2026 · package version 3de00085c944 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100translation-strings
    Use when reviewing a codebase for internationalisation readiness, setting up an i18n library, or preparing strings for a new locale.
  • 100audit-i18n
    Audit and fix internationalisation in web or mobile apps. Use when "audit i18n", "fix translations", "add locale", "hardcoded strings", "localisation", "translation quality", or "the Japanese feels like Google Translate".
  • 100test-first-development-engineering
    Engineering practice: Test-first development — Write a failing test for one small behaviour, make it pass with the least code, then tidy up, so every line you ship is already proven. Use in any language or framework whenever this practice applies, and when reviewing work that should follow it.
  • 100code-review-engineering
    Engineering practice: Code review — Review a pull request in a fixed order, from whether it is correct to whether it is tested, so real problems are caught and feedback is clear enough to act on. Use in any language or framework whenever this practice applies, and when reviewing…
  • 100translation-l10n
    Use when adding a second or Nth language to a web or app product — i18n plumbing (string extraction, ICU messages, locale routing), fixing broken plurals or date formats, and making a UI survive other languages through right-to-left layout and text expansion. NOT defining the…
  • 90i18n-l10n
    Use when a ticket adds user-facing text or must support more than one language, locale, or region — translations, plurals, dates and numbers, currencies, right-to-left layout, time zones — and the implementation must externalise every string, use ICU/CLDR plural rules, format by…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.