i18n
i18n skill establishes the workflow and standards for internationalization, ensuring all user-visible text is properly translated and managed across supported languages. It covers key structure using namespaced dot notation, the critical process of adding new text to every locale directory, and validation through automated checks. Use this skill when adding new user-facing text, creating components with translatable content, or reviewing code for i18n compliance.
i18n skill provides standards and workflow for adding user-facing text with proper internationalization compliance across all supported languages.
AI-generated summary based on this skill's SKILL.md
Install
iOfficeAI/AionUi/i18n · repository language: TypeScript
git clone https://github.com/iOfficeAI/AionUi
cp -r AionUi/.claude/skills/i18n ~/.claude/skills/i18nnpx skillfed install iOfficeAI/AionUi/i18nFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I add translations to the i18n app?
i18n provides a structured workflow for adding translations. Start by creating or updating translation keys in your locale files using namespaced dot notation (e.g., `common.button.submit`). Add the key to every supported language directory simultaneously—never add to one locale without updating all others. Use the i18n module's key management system to ensure consistency, then run validation checks to confirm all keys exist across locales before deploying.
What is the i18n workflow for new text in components?
i18n establishes a three-step workflow: first, define your translation key using dot notation in all locale files; second, import the i18n hook or provider in your component and reference the key (avoid hardcoding strings); third, run i18n compliance checks to detect any remaining hardcoded text. This ensures user-facing text is translatable and maintains consistency across all supported languages from the start.
How do I add a new language with i18n?
i18n supports configuring new languages by creating a new locale directory with the appropriate language code (e.g., `zh-CN`, `fr-FR`). Copy the structure from an existing locale, then populate translation files with keys matching your namespace hierarchy. Update your i18n configuration to register the new locale, and regenerate type definitions if using TypeScript. Validate that all keys are present in the new language before enabling it.
How does i18n help review code for hardcoded strings?
i18n includes compliance review tools that scan components for hardcoded user-facing text and flag i18n violations. Run automated checks across your codebase to identify strings that should be moved into translation files. The skill guides you through refactoring violations by extracting text into properly namespaced keys, ensuring all visible content flows through the i18n system for consistent multi-language support.
What does i18n type generation and validation involve?
i18n can regenerate TypeScript type definitions from your translation files, ensuring type safety when accessing keys. Validation checks confirm all keys exist across every supported locale, catching missing translations before deployment. Use these automated processes to maintain consistency and prevent runtime errors from referencing undefined translation keys.
How should i18n locale files be organized?
i18n recommends organizing locale files by language code directories (e.g., `en`, `zh-CN`) with namespaced JSON or YAML files inside (e.g., `common.json`, `errors.json`). Use dot notation for nested keys to keep structure flat and queryable. This organization scales across multiple languages and makes it easy to locate and update specific translation domains without duplicating keys.
SKILL.md
rendered from the published skill — quoted content, verbatim
i18n Skill
Standards and workflow for internationalization. All user-visible text must use i18n.
Announce at start: "I'm using i18n skill to ensure proper internationalization."
IMPORTANT: Read Config First
Before doing any i18n work, always read src/common/config/i18n-config.json to get the current list of supported languages and modules. Never assume a fixed number — languages and modules may have been added or removed since this skill was written.
cat src/common/config/i18n-config.json
This file is the single source of truth. All scripts, runtime code, and this workflow depend on it.
File Structure
``` src/common/config/i18n-config.json # Single source of truth: languages, modules src/renderer/i18n/ ├── index.ts # i18next configuration ├── i18n-keys.d.ts # AUTO-GENERATED — do not edit
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
.claude/skills/i18n/SKILL.md