home / skills / harborgrid-justin / lexiflow-premium / internationalization-at-scale
/frontend/.github-skills/internationalization-at-scale
This skill enables scalable internationalization with code-splitting and ICU support, delivering sub-second locale switches and RTL-aware layouts.
npx playbooks add skill harborgrid-justin/lexiflow-premium --skill internationalization-at-scaleReview the files below or copy the command above to add this skill to your agents.
---
name: internationalization-at-scale
description: Implement performant i18n pipelines with code-splitting and ICU message support.
---
# Internationalization (i18n) at Scale
## Summary
Implement performant i18n pipelines with code-splitting and ICU message support.
## Key Capabilities
- Dynamically load locale chunks based on user preference.
- Implement ICU message parsing and interpolation.
- Manage bidirectional layout changes for RTL languages.
## PhD-Level Challenges
- Prevent waterfall loading of translation strings.
- Handle layout shifts during locale switching.
- Automate string extraction and synchronization with translation services.
## Acceptance Criteria
- Show sub-second locale switching mechanism.
- Provide valid ICU message usage examples.
- Demonstrate RTL layout mirror correctness.
This skill shows how to implement performant internationalization pipelines for large web apps, focusing on code-splitting, ICU message support, and RTL handling. It is designed for teams building high-performance, legal-grade applications that require sub-second locale switching and correct bidirectional layouts. The guidance emphasizes practical patterns, measurable acceptance criteria, and avoidance of common scaling pitfalls.
The skill demonstrates a runtime that dynamically loads locale-specific chunks on demand to avoid shipping all translations up front. It integrates an ICU message parser and runtime interpolation to support pluralization, gender, and complex formatted messages. It also outlines layout mirroring and CSS strategy to switch between LTR and RTL without visual jank.
How do you avoid layout shifts when switching locale?
Prepare style rules for both directions, swap the dir attribute early, and preload critical fonts and locale-specific resources to prevent reflow.
Can ICU messages be validated at build time?
Yes — validate ICU syntax during CI using a parser to catch errors before deployment and fail builds on invalid messages.
How to prevent translation bundle waterfalls?
Group messages by route/feature, lazy-load those bundles, and use runtime caching with ETag or service-worker strategies.