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:

  1. LangSyncer: is the translation Active (published), not only saved as a draft? Drafts never reach your app.
  2. Delivery: did the published version reach your app? In live mode that means the CDN and your cache; in static mode it means the lang files on disk.
  3. Laravel: is the request using the locale you expect, and is the key spelled the same way in code and in LangSyncer?
  4. 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:

  1. Clear composer cache and retry
  2. 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:

  1. Verify translations are marked as Active in LangSyncer
  2. Run sync command to pull latest:
    php artisan translator:sync
    
  3. If using static mode, regenerate cache:
    php artisan translator:warmup --force
    
  4. Clear Laravel's application cache:
    php artisan cache:clear
    

Missing translations showing raw keys

Symptoms: See messages.welcome instead of "Welcome!"

Checklist:

  1. Verify the key exists in LangSyncer
  2. Verify translation is Active (not Draft)
  3. Check locale matches your app's current locale
  4. Check config/translator-client.php fallback 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:

  1. Verify app()->getLocale() returns expected locale
  2. Check middleware is setting locale correctly
  3. 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:

  1. Verify CLI_TRANSLATOR_CLIENT_MODE=live in .env
  2. Verify CLI_TRANSLATOR_API_KEY is set correctly
  3. Verify CLI_TRANSLATOR_CDN_URL is set (copy from project's API Key & CDN tab)
  4. Ensure translations are Active in LangSyncer

CDN fetch returning 404

Symptoms: translator:sync or translator:warmup fails with "not found" errors

Solution:

  1. Ensure CLI_TRANSLATOR_CDN_URL is set in your .env
  2. Copy the exact URL from your project's API Key & CDN tab in LangSyncer
  3. Verify translations have been published at least once
  4. 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:

  1. Fix the webhook first. See Webhook Issues below.
  2. Clear the cached translations by hand while you investigate. If translations share the default cache store, that is:
    php artisan cache:clear
    
    If you gave them their own store (see the section on cache stores), clear only that one: php artisan cache:clear translations.
  3. Keep the TTL as a safety net. Setting it to 0 caches 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:

  1. CLI_TRANSLATOR_API_KEY in the app's .env is the current key from the project's API Key & CDN tab
  2. If you regenerated the API key in LangSyncer, update .env on every environment
  3. Run php artisan config:clear after changing .env on 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:

  1. Make sure the API key in .env is current (see above)
  2. Make sure no proxy, firewall or middleware rewrites the request body before it reaches the app
  3. Check the app log for Invalid translator webhook signature, which records the time and source IP of the rejected request

Webhook never arrives

Checklist:

  1. The webhook is configured and enabled in the project's Webhooks tab. See Projects.
  2. The URL is public HTTPS and points to your app's webhook route, /api/translator/webhook by default (CLI_TRANSLATOR_CLIENT_WEBHOOK_ROUTE changes it)
  3. CLI_TRANSLATOR_CLIENT_WEBHOOK_ENABLED is true
  4. The route is not behind authentication, IP allow-lists or maintenance mode
  5. Staging and preview environments that are not publicly reachable cannot receive webhooks; rely on the TTL or run translator:sync there

Code Scanner Issues

Scanner not finding translations

Symptoms: Files scanned but no suggestions generated

Checklist:

  1. Verify you're scanning .blade.php or .php files
  2. Check files contain hardcoded strings (not already using __())
  3. 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.

→ Code Scanner Documentation


AI Translation Issues

AI translation failed

Error: AI translation unavailable

Checklist:

  1. Verify you have AI quota remaining
  2. Ensure source text is not empty
  3. Try again in a few minutes

Quota depleted

Solutions:

  1. Purchase a quota pack for immediate credits
  2. Wait for monthly quota reset (billing cycle)
  3. Upgrade to Icebreaker for higher monthly quota

→ Quota Management | Quota Packs


Billing Issues

Payment failed

Solutions:

  1. Verify card details are correct
  2. Check card hasn't expired
  3. Ensure sufficient funds
  4. Try a different payment method via Manage Billing
  5. Contact your bank if declined

Check your current tier at Subscription Plans.

Subscription not active

Checklist:

  1. Go to Subscription to check status
  2. Verify payment completed
  3. Look for failed payment notifications
  4. 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.

We'd like to use analytics and marketing cookies to understand how the site is used. They stay off unless you accept them. Cookie Policy