Translation System
Deltalytix uses next-international for internationalization (i18n). Currently supported languages:- ๐บ๐ธ English (en) - Default
- ๐ซ๐ท French (fr) - Complete
How It Works
Translation Structure
Translations are organized in the/locales directory:
Client vs Server
- Client Components
- Server Components
Use
useI18n() hook in client components:Adding a New Language
Translation Guidelines
Translation Keys
Translation keys use dot notation for organization:Variable Interpolation
Use curly braces for variables:Pluralization
Context-Specific Translations
Organize translations by feature or page:locales/en/shared.ts
locales/fr/shared.ts
Translation Examples
Basic Usage
With Variables
Scoped Translations
Changing Locale
Translation Workflow
Step-by-Step Process
Common Patterns
Nested Objects
Complex Translations
Conditional Text
Best Practices
Be Consistent
Use consistent terminology across all translations. Create a glossary for key terms.
Context Matters
Provide context for translators. Some words have different meanings in different contexts.
Keep it Natural
Translate meaning, not just words. Make it sound natural in the target language.
Test Thoroughly
Test translations in the actual UI. Some languages need more space than English.
Translation Checklist
- All new text has translation keys
- Keys are descriptive and organized
- Variables are properly interpolated
- Translations added to all language files
- Tested in UI with all languages
- No hardcoded strings remain
- Pluralization handled correctly
- Context provided for ambiguous terms
Formatting and Locale
Dates and Times
Deltalytix usesdate-fns for date formatting:
Numbers and Currency
Contributing Translations
Submitting Your Translation
PR Checklist for Translations
- All translation files created
- Client and server configs updated
- No English text remains in files
- Tested in development environment
- Screenshots included in PR
- No missing translation keys
- Formatting appropriate for language
Need help? Ask in our Discord #translations channel!