i18n-translation
БесплатноБез исполняемых скриптовНе проверенGuide for adding internationalization support in the DEVS platform. Use this when asked to add new languages, translate strings, or work with i18n files.
Об этом скилле
Internationalization (i18n) for DEVS
DEVS supports multiple languages. All user-facing strings must be translatable.
Supported Languages
en- English (default)fr- Frenches- Spanishde- Germanit- Italianja- Japanesezh- Chineseko- Koreanpt- Portuguese
File Locations
- UI translations:
src/i18n/locales/{lang}.ts - Agent translations:
public/agents/*.agent.yaml(i18n section) - Methodology translations:
public/methodologies/*.methodology.yaml(i18n section)
UI Translation Structure
// src/i18n/locales/en.ts
export default {
common: {
save: 'Save',
cancel: 'Cancel',
delete: 'Delete',
edit: 'Edit',
loading: 'Loading...',
error: 'An error occurred',
},
agents: {
title: 'Agents',
create: 'Create Agent',
edit: 'Edit Agent',
delete: 'Delete Agent',
name: 'Name',
role: 'Role',
instructions: 'Instructions',
},
conversations: {
title: 'Conversations',
new: 'New Conversation',
empty: 'No messages yet',
placeholder: 'Type your message...',
},
// ... more sections
}
Using Translations in Components
import { useTranslation } from 'react-i18next'
function MyComponent() {
const { t } = useTranslation()
return (
<div>
<h1>{t('agents.title')}</h1>
<Button>{t('common.save')}</Button>
{/* With interpolation */}
<p>{t('agents.greeting', { name: agent.name })}</p>
{/* With pluralization */}
<p>{t('agents.count', { count: agents.length })}</p>
</div>
)
}
Interpolation
// In translation file
{
greeting: 'Hello, {{name}}!',
itemCount: '{{count}} item',
itemCount_plural: '{{count}} items',
}
// In component
t('greeting', { name: 'John' }) // "Hello, John!"
t('itemCount', { count: 1 }) // "1 item"
t('itemCount', { count: 5 }) // "5 items"
Adding a New Translation Key
- Add the key to
src/i18n/locales/en.ts(default language) - Add translations to all other language files
- Use the key in your component with
t('section.key')
// 1. Add to en.ts
export default {
myFeature: {
title: 'My Feature',
description: 'This is my new feature',
},
}
// 2. Add to fr.ts
export default {
myFeature: {
title: 'Ma Fonctionnalité',
description: 'Ceci est ma nouvelle fonctionnalité',
},
}
// 3. Use in component
const { t } = useTranslation()
<h1>{t('myFeature.title')}</h1>
Agent/Methodology i18n
Add translations directly in YAML files:
id: my-agent
name: My Agent
desc: Short description
role: Role description
instructions: |
English instructions...
i18n:
fr:
name: Mon Agent
desc: Description courte
role: Description du rôle
instructions: |
Instructions en français...
es:
name: Mi Agente
desc: Descripción corta
role: Descripción del rol
instructions: |
Instrucciones en español...
de:
name: Mein Agent
desc: Kurze Beschreibung
role: Rollenbeschreibung
instructions: |
Anweisungen auf Deutsch...
Critical Rules
1. Use Curly Apostrophe
Always use ' (curly apostrophe) instead of ' (straight apostrophe) in translation strings:
// ✅ Correct
"It's working" // Using '
"Don't forget" // Using '
// ❌ Wrong
"It's working" // Using '
"Don't forget" // Using '
2. Alphabetical Ordering
Keep translation keys in alphabetical order within each section:
export default {
common: {
cancel: 'Cancel', // a
delete: 'Delete', // d
edit: 'Edit', // e
save: 'Save', // s
},
}
3. Consistent Key Naming
Use camelCase for keys, organized by feature:
{
agents: {
createNew: 'Create New Agent',
deleteConfirm: 'Are you sure you want to delete this agent?',
editTitle: 'Edit Agent',
},
}
4. No HTML in Translations
Avoid HTML in translation strings. Use Trans component for complex formatting:
import { Trans } from 'react-i18next'
// Instead of: t('message', { link: '<a href="...">' })
;<Trans i18nKey="learnMore">
Click <a href="/docs">here</a> to learn more.
</Trans>
Adding a New Language
- Create new locale file:
src/i18n/locales/{lang}.ts - Copy structure from
en.tsand translate all strings - Add language code to
src/i18n/locales.ts - Add language option to settings UI
// src/i18n/locales.ts
export const supportedLocales = [
{ code: 'en', name: 'English' },
{ code: 'fr', name: 'Français' },
{ code: 'es', name: 'Español' },
{ code: 'new', name: 'New Language' }, // Add new language
] as const
Validation
Run type checking to ensure all translation keys are present:
npm run typecheck
Missing translations will cause TypeScript errors if the translation types are properly configured.
Testing Translations
import { describe, it, expect, vi } from 'vitest'
Установить i18n-translation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл i18n-translation?
Guide for adding internationalization support in the DEVS platform. Use this when asked to add new languages, translate strings, or work with i18n files.
Как установить скилл i18n-translation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл i18n-translation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic