LangSyncer Troubleshooting Guide
Solutions to common issues when using LangSyncer for Laravel localization and translation management.
Start Here: Find the Layer That Fails
Most problems sit in one of four layers. Checking them in order saves time:
- LangSyncer: is the translation Active (published), not only saved as a draft? Drafts never reach your app.
- Delivery: did the published version reach your app? In
livemode that means the CDN and your cache; instaticmode it means the lang files on disk. - Laravel: is the request using the locale you expect, and is the key spelled the same way in code and in LangSyncer?
- Your view: is the text actually going through
__(), or is it hardcoded?
php artisan translator:status answers most of layer 2 in one command, and php artisan translator:inspect --locale=es shows the exact values your app has received. Both are described under Diagnostic Commands.
Installation Issues
Package won't install
Error: Package not found
Solution:
- Clear composer cache and retry
- Verify the package name is correct
composer clear-cache
composer require headwires/translator-client
For full setup instructions, see Getting Started.
Configuration not publishing
Error: Unable to publish configuration
Solution:
php artisan vendor:publish --tag=translator-client-config --force
Translation Issues
Translations not updating
Symptoms: Published changes don't appear in your app
Checklist:
- Verify translations are marked as Active in LangSyncer
- Run sync command to pull latest:
php artisan translator:sync - If using
staticmode, regenerate cache:php artisan translator:warmup --force - Clear Laravel's application cache:
php artisan cache:clear
Missing translations showing raw keys
Symptoms: See messages.welcome instead of "Welcome!"
Checklist:
- Verify the key exists in LangSyncer
- Verify translation is Active (not Draft)
- Check locale matches your app's current locale
- Check
config/translator-client.phpfallback settings:'fallback_locale' => 'en',
Variables not replaced
Symptoms: See :name instead of actual name
Solutions:
- Ensure you're passing variables:
__('messages.welcome', ['name' => $user->name]) - Check variable name matches exactly (case-sensitive)
Wrong locale showing
Symptoms: Getting English when expecting Spanish
Checklist:
- Verify
app()->getLocale()returns expected locale - Check middleware is setting locale correctly
- Verify translation exists for that locale in LangSyncer
Client Mode Issues
Live mode not fetching translations
Symptoms: Changes in LangSyncer not reflected in live mode
Checklist:
- Verify
CLI_TRANSLATOR_CLIENT_MODE=livein.env - Verify
CLI_TRANSLATOR_API_KEYis set correctly - Verify
CLI_TRANSLATOR_CDN_URLis set (copy from project's API Key & CDN tab) - Ensure translations are Active in LangSyncer
CDN fetch returning 404
Symptoms: translator:sync or translator:warmup fails with "not found" errors
Solution:
- Ensure
CLI_TRANSLATOR_CDN_URLis set in your.env - Copy the exact URL from your project's API Key & CDN tab in LangSyncer
- Verify translations have been published at least once
- Click Regenerate CDN in the project's Actions modal to refresh CDN files
Live mode shows changes only after a delay
Symptoms: A published change appears, but minutes or up to an hour later instead of within seconds
Why: In live mode each translation group is cached for CLI_TRANSLATOR_CLIENT_CACHE_TTL seconds (3600 by default). Publishing sends a webhook that clears the cached groups straight away. If the webhook never arrives, nothing clears the cache and the change appears only when the TTL expires.
Solution:
- Fix the webhook first. See Webhook Issues below.
- Clear the cached translations by hand while you investigate. If translations share the default cache store, that is:
If you gave them their own store (see the section on cache stores), clear only that one:php artisan cache:clearphp artisan cache:clear translations. - Keep the TTL as a safety net. Setting it to
0caches translations forever and relies on webhooks alone, which is only safe once webhooks are working reliably.
Changing a project's languages clears more than translations
Symptoms: After adding or removing a language in LangSyncer, other cached data is rebuilt, or users are logged out
Why: Publishing only clears the affected locales and groups. Adding or removing a language is different: the client clears every cached translation for the project. On Redis it removes only its own keys, but on other cache drivers it cannot select keys by prefix, so it flushes the entire cache store it uses. If that store also holds your sessions or application cache, they are cleared too.
Solution: Give translations their own store, for example a dedicated Redis connection or a separate file store, and point the client at it:
CLI_TRANSLATOR_CLIENT_CACHE_DRIVER=translations
translations here is the name of a store you define in config/cache.php.
App shows old text when the CDN is unreachable
Symptoms: After a network or CDN problem, the app shows older text and your log contains Failed to load translation from CDN, falling back to files
Why: This is the safety net working. When a group cannot be loaded from the CDN, the client falls back to the lang files in your repository, so users see the last version you deployed instead of raw keys.
Solution: The fallback stays in place until the cached groups expire. Once the CDN is reachable again, clear the translation cache (as above) or wait for the TTL. Keep your lang files reasonably up to date, with a periodic translator:sync in static mode or before a release, so the fallback is never far behind.
Warmup only loads some languages
Symptoms: After translator:warmup, English and Spanish are fast but other languages are fetched on the first request
Why: Without the --locales option, the warmup command falls back to en and es.
Solution: List your locales explicitly, for example in your deployment script:
php artisan translator:warmup --locales=en --locales=es --locales=fr --locales=de
Static mode cache stale
Symptoms: Old translations despite publishing new ones
Solution:
php artisan translator:sync
php artisan translator:warmup --force
Add to your deployment script to automate this.
Webhook Issues
When you publish, LangSyncer sends a webhook to your app. In live mode the client clears the affected translations from its cache; in static mode it runs translator:sync --force to rewrite the lang files. If the webhook fails, nothing breaks, but changes wait for the cache TTL (live) or for the next manual sync (static).
Webhook returns 404 "Project not found"
Why: The webhook payload carries the project's API key, and your app did not find a configured project with that key.
Checklist:
CLI_TRANSLATOR_API_KEYin the app's.envis the current key from the project's API Key & CDN tab- If you regenerated the API key in LangSyncer, update
.envon every environment - Run
php artisan config:clearafter changing.envon a server that caches its configuration
Webhook returns 401 "Invalid signature"
Why: The client checks the X-Translator-Signature header, an HMAC-SHA256 of the request body signed with a secret tied to your API key. A mismatch means the key in your app is not the one LangSyncer signs with, or something between them changed the body.
Checklist:
- Make sure the API key in
.envis current (see above) - Make sure no proxy, firewall or middleware rewrites the request body before it reaches the app
- Check the app log for
Invalid translator webhook signature, which records the time and source IP of the rejected request
Webhook never arrives
Checklist:
- The webhook is configured and enabled in the project's Webhooks tab. See Projects.
- The URL is public HTTPS and points to your app's webhook route,
/api/translator/webhookby default (CLI_TRANSLATOR_CLIENT_WEBHOOK_ROUTEchanges it) CLI_TRANSLATOR_CLIENT_WEBHOOK_ENABLEDistrue- The route is not behind authentication, IP allow-lists or maintenance mode
- Staging and preview environments that are not publicly reachable cannot receive webhooks; rely on the TTL or run
translator:syncthere
Code Scanner Issues
Scanner not finding translations
Symptoms: Files scanned but no suggestions generated
Checklist:
- Verify you're scanning
.blade.phpor.phpfiles - Check files contain hardcoded strings (not already using
__()) - Ensure files are in the scanned directory
Scanner false positives
Symptoms: Scanner suggests translating code that shouldn't be translated
Solution: Review suggestions carefully before applying. The scanner may suggest translations in invalid PHP contexts like array keys or constants.
AI Translation Issues
AI translation failed
Error: AI translation unavailable
Checklist:
- Verify you have AI quota remaining
- Ensure source text is not empty
- Try again in a few minutes
Quota depleted
Solutions:
- Purchase a quota pack for immediate credits
- Wait for monthly quota reset (billing cycle)
- Upgrade to Icebreaker for higher monthly quota
→ Quota Management | Quota Packs
Billing Issues
Payment failed
Solutions:
- Verify card details are correct
- Check card hasn't expired
- Ensure sufficient funds
- Try a different payment method via Manage Billing
- Contact your bank if declined
Check your current tier at Subscription Plans.
Subscription not active
Checklist:
- Go to Subscription to check status
- Verify payment completed
- Look for failed payment notifications
- Contact support if payment shows successful but subscription isn't active
Common Error Messages
| Error | Cause | Solution |
|---|---|---|
| "Project not found" | API key invalid or project deleted | Verify CLI_TRANSLATOR_API_KEY in .env |
| "CDN fetch failed" / 404 | CDN URL not configured | Add CLI_TRANSLATOR_CDN_URL from project's Actions modal |
| "Quota exceeded" | AI quota depleted | Purchase quota pack or wait for reset |
| "Invalid translation key" | Key has invalid characters | Use only letters, numbers, dots, underscores |
| "Duplicate key" | Key already exists | Update existing key instead |
Diagnostic Commands
Check configuration status
php artisan translator:status
Shows:
- Project name
- API Key (configured/missing)
- CDN URL (configured/missing)
- Lang files path
- Mode (static/live/auto)
- Cache TTL
- Webhook status
Inspect what your app received
# Projects, locales and groups the client knows about
php artisan translator:inspect
# The values for one locale
php artisan translator:inspect --locale=es
# Keys only, or raw JSON for a bug report
php artisan translator:inspect --locale=es --keys
php artisan translator:inspect --locale=es --json
If a value is correct in LangSyncer but wrong here, the problem is delivery (cache, CDN or webhook). If it is correct here but wrong on the page, the problem is in Laravel: locale, key name or a hardcoded string.
Force a fresh copy
# Re-download even when checksums say nothing changed
php artisan translator:sync --force
Getting Help
Before contacting support, gather:
- Error messages (full text)
- Steps to reproduce
- Laravel version (
php artisan --version) - Package version (
composer show headwires/translator-client)
For configuration issues, review the Getting Started guide. For common questions, check the FAQ.
Contact support for billing or technical issues.