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.
When adding new translatable text to Lychee:
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.',
];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
];Ensure consistency across all languages:
php artisan test --filter LangTest- 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
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
- Visit https://weblate.lycheeorg.dev/
- Request access through the Lychee community or GitHub discussions
- Select your target language
- 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
- Understand where the text will appear in the interface
- Consider the space available for the text
- Maintain consistency with existing translations
- Use consistent terminology throughout your translations
- Follow established conventions for your language
- Maintain the same tone as the English source
- Handle plural forms according to your language's rules
- Test plural forms with different values when possible
- 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
Create a new directory in lang/ using the appropriate language code:
# Example: Adding Spanish (es)
mkdir lang/esCopy all files from lang/en/ to the new directory:
cp lang/en/*.php lang/es/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
],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
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- Missing translations (English text in non-English language)
- Incorrect translations
- Inconsistent terminology
- Poor fit for UI space
-
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
- 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
- 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
- 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
- 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.
- Localization Reference - Technical reference for file structure and conventions
- Coding Conventions - General coding standards
Last updated: January 21, 2026