Skip to content
Locale Lab

Reference · printable summary

Reference sheet

Core engineering rules from all 21 chapters and reference tables. Formatted to print on A4 or Letter paper.

Core rules (21 chapters)

Part 1 · Getting Oriented

  1. 01Orientation. Assign every localization requirement to its governing layer: Unicode for character properties, CLDR for locale data, ICU and Intl for runtime formatting, and BCP 47 for locale identification.

Part 2 · Common UI Defects

  1. 02Text Expansion. Budget +100% to +200% extra width for English strings under 10 characters and +30% for strings over 70 characters, and use flexible containers that wrap and grow.
  2. 03Locale Formatters. Format numbers, currencies, dates, and units with ECMAScript Intl APIs and CLDR locale data. Never construct formatted strings by manual concatenation.
  3. 04Plurals and Gender. Resolve grammatical plural categories at runtime with Intl.PluralRules or ICU MessageFormat. Never hardcode count === 1 conditional branches.

Part 3 · The Intl Toolbox

  1. 05Lists and Ranges. Format lists with Intl.ListFormat, format date and number intervals with formatRange, and select range plural categories with Intl.PluralRules.prototype.selectRange.
  2. 06Sorting. Sort user-facing lists with Intl.Collator using the active locale, and use usage: 'search' with sensitivity: 'base' for locale-aware string matching.
  3. 07Time Zones. Store past timestamps as UTC instants, store future scheduled events as local wall time plus an IANA time zone identifier, and never assume offsets are whole hours.
  4. 08Calendars. Store dates as ISO 8601, format them through the locale's resolved calendar system, read week metadata from Intl.Locale, and never run arithmetic on formatted years.
  5. 09Locale Fallback. Ship region-neutral base catalogs alongside regional catalogs, include script subtags for Chinese, and honor explicit user locale selections before running negotiation.

Part 4 · Scripts and Layout

  1. 10Line Breaking. Configure CSS line-break: strict for CJK text, scope word-break: keep-all to Korean only, and never apply word-break: break-all to dictionary-segmented Southeast Asian scripts.
  2. 11CJK Font Fallback. Declare the HTML lang attribute and assign a regional CJK font stack to each language so the browser selects the correct regional glyph forms.
  3. 12Bidirectional Text. Isolate every interpolated variable in bidirectional text using HTML <bdi> elements or Unicode FSI/PDI code points (U+2068 and U+2069).
  4. 13RTL Mirroring. Write layout rules with CSS Logical Properties so setting dir="rtl" on the root element mirrors the UI automatically, and flip only icons that represent navigation or linear time.

Part 5 · Strings, Names, and Input

  1. 14Unicode Strings. Normalize strings to NFC at system boundaries, segment user-visible characters by grapheme cluster, and pin the locale when changing case.
  2. 15Character Encoding. Use UTF-8 across all storage and transport layers and declare the encoding at every read boundary. Mojibake occurs when a reader decodes bytes with the wrong character table.
  3. 16Input Parsing. Derive locale decimal and grouping separators from formatToParts, fold non-ASCII digit blocks to ASCII before parsing, and exchange data in locale-neutral wire formats.
  4. 17Names and Addresses. Use a single full-name field unless a downstream system requires split parts, and drive address field order, labels, and validation from country-specific metadata.

Part 6 · Shipping Translations

  1. 18Translation Pipeline. Externalize complete sentences with named placeholders and translator context notes, and keep source terminology consistent to maximize translation memory leverage.
  2. 19Pseudolocalization. Run pseudolocalization in CI to catch hardcoded strings, string concatenation, broken placeholders, and layout truncation before ordering human translations.
  3. 20LQA Scoring. Classify every translation error by MQM dimension and severity. Report the normalized penalty score together with the severity weights, pass threshold, and word sample size.
  4. 21The Audit. Audit localized screens systematically across numbers, dates, plurals, directionality, layout, names, and inputs against CLDR rules for the target locale.

Reference tables

Cardinal plural categories

Each counted message requires one translated form per category. Computed at runtime with Intl.PluralRules.

LanguageFormsCategories
Chinese zh1other
Japanese ja1other
English en2one other
German de2one other
Turkish tr2one other
French fr3one many other
Hebrew he3one two other
Portuguese pt3one many other
Romanian ro3one few other
Spanish es3one many other
Czech cs4one few many other
Polish pl4one few many other
Russian ru4one few many other
Arabic ar6zero one two few many other
Welsh cy6zero one two few many other

MQM severity weights

Default weights from MQM worked examples. Penalties normalize per 1,000 words, placing the raw pass threshold near 99. Any critical error fails the delivery regardless of the numeric score.

SeverityWeightApplies when
Neutral×0Noted for the record, but it costs the reader nothing. Often a preference.
Minor×1Noticeable, but the meaning survives. The reader is slowed down.
Major×5The reader is misled, confused, or blocked on this string.
Critical×25Safety, legal, financial, or brand damage.

Text expansion allowance

Short source strings expand by the largest percentage. The IBM and W3C table budgets +100-200% for strings up to 10 characters and +30% above 70 characters. Buttons, tabs, and badges overflow first.

Locale tag syntax (BCP 47)

sr - Cyrl - RS - u - ca-buddhist
│    │      │    └── extension: calendar override
│    │      └── region subtag (ISO 3166-1)
│    └── script subtag (ISO 15924)
└── language subtag (ISO 639)

Script and region subtags are optional. The -u- extension specifies calendar, numbering system, and collation overrides.