Overview
Kuest includes built-in support for multiple languages usingnext-intl. The platform supports 6 languages out of the box and includes automatic translation for event titles and categories powered by AI.
Supported Languages
Kuest supports the following languages:| Code | Language | Native Name | Status |
|---|---|---|---|
en | English | English | Default |
de | German | Deutsch | Supported |
es | Spanish | Spanish | Supported |
pt | Portuguese | Português | Supported |
fr | French | French | Supported |
zh | Chinese | 中文 | Supported |
English (
en) is the default locale and cannot be disabled.Locale Configuration
Enabling/Disabling Locales
- Admin Panel
- Settings Storage
- Code Access
- Navigate to Admin → Locales
- Select which languages to enable
- English is always enabled (default)
- Click Save settings
Disabled locales will not appear in language selectors and users cannot access content in those languages.
Routing Configuration
Locale routing is configured insrc/i18n/routing.ts:
localePrefix: 'as-needed'- Default locale (en) has no prefix, others dolocaleDetection: false- Manual locale selection only
Translation Files
Translations are stored in JSON files undersrc/i18n/messages/:
Translation File Format
- Structure
- German Example
Each translation file uses key-value pairs:Keys are short hashes generated by
src/i18n/messages/en.json
next-intl during message extraction.Using Translations in Code
- Client Components
- Server Components
- With Variables
Adding New Languages
To add a new language to Kuest:Enable in admin panel
- Go to Admin → Locales
- The new language should appear in the list
- Check it to enable
- Save settings
Automatic Translations
Kuest can automatically translate event titles and category names using AI.Configuration
- Enable/Disable
- How It Works
- Settings Storage
- Navigate to Admin → Locales
- Toggle Automatic translations of event titles and categories
- Ensure OpenRouter is configured in Admin → General
- Click Save settings
Automatic translations require an OpenRouter API key and model selection. Configure this in Admin → General → OpenRouter integration.
Translation Requirements
Locale Settings Code
Locale configuration is managed insrc/i18n/locale-settings.ts:
Language Selector
Users can switch languages via the language selector in the UI: Location:- Navigation menu (desktop)
- Mobile menu
- Footer (some layouts)
- Shows only enabled locales
- Preserves current page when switching
- Updates URL with locale prefix (except English)
- Stores preference in browser (optional)
Translation Workflow
Recommended workflow for managing translations:Extract messages
Run message extraction (if using This generates message keys in
next-intl extraction):en.jsonTest translations
- Switch to each locale in the UI
- Verify text displays correctly
- Check for layout issues with longer text
- Test with missing translations (falls back to English)
Best Practices
Translation Keys
Translation Keys
- Use the auto-generated hash keys from
next-intl - Keep English as the source of truth
- Don’t hardcode text in components
- Use variables for dynamic content:
{name},{count} - Group related translations with namespaces if needed
Text Length
Text Length
- Design UI to accommodate longer translations (German, French ~30% longer)
- Test layouts with all locales
- Use truncation or wrapping for long text
- Avoid fixed-width containers
- Test button labels in all languages
Cultural Considerations
Cultural Considerations
- Use locale-appropriate date/time formats
- Format numbers and currency correctly per locale
- Consider right-to-left (RTL) support if adding Arabic/Hebrew
- Use culturally appropriate examples and imagery
- Avoid idioms that don’t translate well
Quality Assurance
Quality Assurance
- Have native speakers review translations
- Test automatic translations for accuracy
- Monitor user feedback per locale
- Keep a glossary of key terms
- Update translations when features change
Troubleshooting
Missing translations
Missing translations
Problem: Some text appears in English in other localesSolution:
- Check if the key exists in the locale file
- Verify the translation file is valid JSON
- Ensure the file is in
src/i18n/messages/ - Restart the dev server
- Check browser console for warnings
Automatic translations not working
Automatic translations not working
Problem: Events not being translated automaticallySolution:
- Verify OpenRouter API key is configured
- Check that a model is selected
- Ensure automatic translations are enabled
- Check API credits on OpenRouter
- Look for errors in server logs
- Verify network connectivity to OpenRouter
Locale not showing in selector
Locale not showing in selector
Problem: Added locale doesn’t appear in language menuSolution:
- Check locale is in SUPPORTED_LOCALES array
- Verify locale is enabled in admin panel
- Ensure translation file exists
- Clear cache and restart server
- Check for typos in locale code
Wrong locale on page load
Wrong locale on page load
Problem: Page loads in wrong languageSolution:
- Check URL path (should include locale prefix)
- Verify
localeDetection: falsein routing config - Clear browser cache and cookies
- Check for middleware redirect issues
- Ensure locale is in enabled locales list
Locale Data Reference
Locale Constants
src/i18n/locales.ts
Settings Keys
| Group | Key | Description | Format |
|---|---|---|---|
i18n | enabled_locales | List of enabled languages | JSON array: ["en","de"] |
i18n | automatic_translations_enabled | Auto-translate events | String: "true" or "false" |
Related Configuration
Admin Panel
Access locale configuration interface
OpenRouter Setup
Configure AI translations
Branding
Localize site name and description
Theme Settings
UI customization for different locales