Designing Internationalization Architecture
1. Designing Multi-Language Support
| Element | Detail |
|---|---|
| Locale tag | BCP 47 (en-US, zh-Hant-TW) |
| Resource bundles | Per-locale message files |
| ICU MessageFormat | Pluralization, gender, select |
| Fallback chain | fr-CA → fr → en |
| Libraries | i18next, FormatJS, gettext, ICU4J |
2. Designing Translation Management System
| Tool | Detail |
|---|---|
| Lokalise / Phrase / Crowdin / Transifex | SaaS TMS |
| Source of truth | Master language (usually en) |
| Workflow | Extract → translate → review → import |
| In-context editing | Translators see UI |
| Versioning | Track keys per release |
3. Designing Locale-Specific Formatting
| Type | Detail |
|---|---|
| Number | 1,234.56 vs 1.234,56 |
| Date | MDY / DMY / YMD; Intl.DateTimeFormat |
| Currency | Symbol position, code |
| Calendar | Gregorian, Hijri, Buddhist |
| Sort order | Locale collation (Intl.Collator) |
4. Designing Currency Conversion
| Aspect | Detail |
|---|---|
| Source rates | ECB, OpenExchange, providers |
| Cache + refresh | Daily for display |
| Lock at txn | Don't recompute later |
| Rounding | Per-currency minor units |
| Display vs settle | Different policies |
5. Designing Time Zone Management
| Practice | Detail |
|---|---|
| Store UTC | Always |
| Store original TZ | For events tied to location |
| IANA names | "America/Los_Angeles" |
| DST | Library-handled |
| tzdata updates | Keep current |
6. Designing RTL Language Support
| Aspect | Detail |
|---|---|
| dir="rtl" | HTML attribute |
| Logical CSS | margin-inline-start vs margin-left |
| Mirror icons | Directional only |
| Bidi text | Use Unicode markers |
| Test | Pseudo-locale ar-XB |
7. Designing Content Localization
| Element | Detail |
|---|---|
| Marketing copy | Per-locale variants |
| Images / video | Culturally appropriate |
| Legal text | Jurisdiction-specific |
| Email templates | Per-locale |
| Headless CMS | Contentful, Sanity, Strapi |
8. Designing Regional Compliance
| Regulation | Detail |
|---|---|
| GDPR (EU) | Consent, data rights |
| CCPA / CPRA (CA) | Opt-out of sale |
| LGPD (BR) | Brazilian privacy |
| PIPL (CN) | China data localization |
| Data residency | Per-region storage |
9. Designing Unicode Support
| Practice | Detail |
|---|---|
| UTF-8 everywhere | Storage, transport |
| DB | utf8mb4 (MySQL); UTF8 (PG) |
| Normalization | NFC for storage; NFKC for compare |
| Length | Bytes vs codepoints vs graphemes |
| Emoji | Multi-codepoint sequences |
10. Designing Multi-Region Content Delivery
| Strategy | Detail |
|---|---|
| CDN per locale | Vary on Accept-Language |
| URL-based | /en/, /es/, en.example.com |
| hreflang tags | SEO for alternate languages |
| Edge personalization | Geo + locale at edge |
11. Designing Language Detection
| Source | Detail |
|---|---|
| User preference | Highest priority |
| URL path / subdomain | Explicit |
| Accept-Language header | Browser hint |
| Geo IP | Last resort; allow override |
| Persist choice | Cookie / profile |
12. Designing Pluralization Handling
| Aspect | Detail |
|---|---|
| CLDR rules | zero/one/two/few/many/other |
| ICU MessageFormat | "{count, plural, one {# item} other {# items}}" |
| Avoid concat | "You have " + n + " items" |
| Gender-aware | "select" in ICU |