intl
Installation
SKILL.md
Internationalization Rules
CMS: Localized Fields
- All text fields (e.g. labels, titles) should have
localized: true
Web: Labels & Translations
This is a multi-language website. When adding labels or text to Astro components:
- Never hardcode text strings - All user-facing text must be translatable
- Update the CMS labels global - Add necessary fields to
/cms/src/globals/labels.ts- Use the
globalgroup for common, site-wide labels (e.g., "show-more", "close", "loading") - Use specific groups for scoped labels (e.g.,
articlesfor article-related text,contactfor contact forms)
- Use the
- Access labels in components - Use
const { labels } = globalState - Example usage:
labels.articles['written-by']orlabels.global['show-more']
- When adding labels to the CMS, ensure you use all of them. Delete unused labels after implementation.