·
2 min read
Live vs Static Mode: Which One Should You Use?
architecture
laravel
best-practices
LangSyncer supports two modes for delivering translations to your Laravel app. Understanding the difference helps you pick the right one.
Static Mode
Translations are stored as files in your application.
CLI_TRANSLATOR_CLIENT_MODE=static
How it works:
- Run
php artisan translator:sync - Translations download to
storage/translator-client/ - Your app reads from local files
- Changes require re-running sync
Best for:
- Traditional hosting (shared hosting, VPS)
- Apps where you control deployments
- Maximum reliability (no external dependencies at runtime)
Drawback:
- Updates require running a command or webhook
Live Mode
Translations are cached and updated automatically via webhooks.
CLI_TRANSLATOR_CLIENT_MODE=live
CLI_TRANSLATOR_CLIENT_WEBHOOK_ENABLED=true
How it works:
- Translations cached in your Laravel cache (Redis, database, etc.)
- When you publish, LangSyncer sends a webhook
- Cache invalidates automatically
- Next request fetches fresh translations
Best for:
- Serverless (Laravel Vapor, AWS Lambda)
- Teams needing instant updates
- Content teams who manage their own translations
Drawback:
- Requires persistent cache driver (not
fileon serverless)
Auto Mode
Let LangSyncer decide.
CLI_TRANSLATOR_CLIENT_MODE=auto
It detects your environment:
- Serverless? → Live mode
- Traditional? → Static mode
My Recommendation
Start with Live mode. The instant updates are worth it. You can always switch to Static if you need more control.
For production apps with high traffic, consider:
- Live mode with Redis cache
- Fallback to static files if cache fails
translator:warmupon deploy to pre-populate cache