-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
📌 Parent Epic
🎯 Goal
Integrate Translation.io into the Laravel API backend to enable multi-language support. This includes installing the package, configuring environment variables, setting up locales (en, de), and optionally adding the locale middleware to API routes.
📋 Implementation Tasks
- Install
tio/laravelpackage via Composer - Create
config/translation.phpwith API key from environment - Add
TRANSLATIONIO_KEYplaceholder to.env.example - Configure actual API key in
.env(not committed) - Set
source_localetoenandtarget_localesto['de'] - Configure
gettext_parse_pathsto include['app', 'resources'] - Add Translation.io locale middleware to
routes/api.php(optional, evaluate necessity) - Run
php artisan translation:initto initialize Translation.io sync - Add Translation.io credit to README.md (required for Open Source plan)
- Update CHANGELOG.md with entry in [Unreleased] → Added section
- All tests passing
- PHPStan and Pint checks passing
- Documentation in README about translation workflow
✅ Acceptance Criteria
- Translation.io package installed and configured
- Environment variables properly set (placeholder in example, actual key in .env)
- API key stored securely in
.env, not in version control -
php artisan translation:initexecuted successfully - Translation.io dashboard shows project synced
- README includes mention of Translation.io (Open Source plan requirement)
- All tests passing (≥80% coverage maintained)
- PHPStan level max passing
- Laravel Pint passing
- CHANGELOG.md updated
- No breaking changes to existing API endpoints
- LOC count ≤ 600 (excluding lock files, or marked with
large-pr-approvedlabel if needed)
🔗 Dependencies
- Depends on: Translation.io account setup (✓ completed)
- Blocks: #TBD (Frontend implementation - requires API to be ready first)
📝 Technical Notes
- Package:
tio/laravel(https://github.com/translation/laravel) - API Key:
0ebce5906cb64a93bbd845cf7925a4ae(store in.envasTRANSLATIONIO_KEY) - Configuration File:
config/translation.php - Locales:
- Source:
en(English) - Target:
de(German)
- Source:
- Gettext Paths:
['app', 'resources']- scans these directories for translatable strings - Middleware: Translation.io provides a
set.localemiddleware - evaluate if needed for API routes - Open Source Plan Requirements:
- Public repository (✓ already public)
- Mention Translation.io in README
🧪 Testing Strategy
- Verify configuration loads correctly
- Test that
php artisan translation:initcompletes without errors - Ensure no existing functionality is broken
- Verify Translation.io dashboard receives initial sync
- Test locale switching (if middleware is added)
📝 PR Linking Instructions
When creating the PR for this sub-issue, use this in your PR description:
Fixes #<this-sub-issue-number>
Part of: #83- Do NOT use
Fixes #83- this is not the last sub-issue - The epic should only close when the frontend implementation is also complete
Metadata
Metadata
Assignees
Type
Projects
Status
✅ Done