Translating Lychee
January 25, 2026 · View on GitHub
This guide explains how to contribute translations to Lychee, whether you're adding new translation keys as a developer or translating the application into your native language.
For Developers: Adding Translation Keys
When adding new translatable text to Lychee:
Step 1: Add the English Translation
Add the translation to the appropriate file in lang/en/:
// lang/en/gallery.php
return [
// ... existing keys
'new_feature_title' => 'New Feature',
'new_feature_description' => 'This is a description of the new feature.',
];
Step 2: Copy to All Languages
Copy the new key to all other language files with the English text as placeholder:
// lang/fr/gallery.php (and all other languages)
return [
// ... existing keys
'new_feature_title' => 'New Feature', // Will be translated via Weblate
'new_feature_description' => 'This is a description of the new feature.', // Will be translated via Weblate
];
Step 3: Run Tests
Ensure consistency across all languages:
php artisan test --filter LangTest
Best Practices for Developers
- Add English first - Always create the English translation before any others
- Copy to all languages - Immediately copy new keys to all language files
- Use descriptive key names - Follow the naming conventions in the reference documentation
- Test thoroughly - Run translation tests before committing
- Update Weblate - Sync changes to Weblate for translators to complete
Manual Quality Checks
Before submitting changes:
- Verify English content is accurate and well-written
- Check key naming follows conventions
- Ensure proper nesting for logical grouping
- Run tests to validate consistency
- Test in application to verify context and formatting
For Translators: Using Weblate
Getting Access
- Visit https://weblate.lycheeorg.dev/
- Request access through the Lychee community or GitHub discussions
- Select your target language
Translation Workflow
- Select Language and File: Choose the language and file you want to translate
- Review Context: Use the provided context and source code references
- Provide Translation: Enter your translation following the guidelines
- Submit for Review: Submit your translation through the Weblate interface
Translation Guidelines
Context is Key
- Understand where the text will appear in the interface
- Consider the space available for the text
- Maintain consistency with existing translations
Consistency
- Use consistent terminology throughout your translations
- Follow established conventions for your language
- Maintain the same tone as the English source
Pluralization
- Handle plural forms according to your language's rules
- Test plural forms with different values when possible
Testing
- Test your translations in the application when possible
- Verify that translations fit in the UI without breaking layout
- Check for proper encoding of special characters
Adding a New Language
Step 1: Create Language Directory
Create a new directory in lang/ using the appropriate language code:
# Example: Adding Spanish (es)
mkdir lang/es
Step 2: Copy Translation Files
Copy all files from lang/en/ to the new directory:
cp lang/en/*.php lang/es/
Step 3: Update Configuration
Add the language to relevant configuration files (this may vary based on Lychee's current implementation):
// config/app.php (or similar)
'available_locales' => [
'en' => 'English',
'es' => 'Español',
// ... other languages
],
Step 4: Add to Weblate
Configure Weblate to include the new language:
- Access Weblate admin interface
- Add the new language to the Lychee project
- Configure auto-commit settings if needed
Step 5: Test
Test the new language in the application:
# Run full test suite
php artisan test
# Test in the application
# - Change language in settings
# - Verify all UI elements display correctly
# - Check for encoding issues
Improving Existing Translations
Identifying Issues
- Missing translations (English text in non-English language)
- Incorrect translations
- Inconsistent terminology
- Poor fit for UI space
Making Improvements
-
Via Weblate (Recommended):
- Access https://weblate.lycheeorg.dev/
- Find the translation to improve
- Suggest or apply the correction
- Submit for review
-
Via Pull Request:
- Fork the repository
- Make corrections in the appropriate language file
- Test your changes
- Submit a pull request with clear description
Contributing Best Practices
For Everyone
- Respect existing conventions - Follow established patterns
- Communicate - Coordinate with other translators
- Test thoroughly - Verify translations work in context
- Be consistent - Maintain terminology across the application
- Stay updated - Keep translations current as Lychee evolves
For Developers
- Always start with English translations
- Copy new keys to all language files immediately
- Provide context in key names for translators
- Test with translations before finalizing features
- Coordinate with translators for major text changes
For Translators
- Ask for context if unclear about usage
- Be consistent with terminology
- Test when possible to verify fit and correctness
- Collaborate with other translators for your language
- Report issues through appropriate channels
Getting Help
- Weblate Issues: Report through the Weblate platform
- Translation Questions: Ask in GitHub discussions or Discord
- Technical Issues: Open an issue on GitHub
- Language Coordination: Connect with other translators for your language
This localization system ensures Lychee remains accessible to users worldwide while maintaining code quality and translation consistency across all supported languages.
Related Documentation
- Localization Reference - Technical reference for file structure and conventions
- Coding Conventions - General coding standards
Last updated: January 21, 2026