weglot/translate-bundle
A Symfony bundle that integrates Weglot’s website translation service, making it easy to add multilingual support with minimal configuration. Manage translations through Weglot and serve localized content automatically.
Architecture fit — this is the headline finding. Despite being catalogued as a "Laravel/PHP package," weglot/translate-bundle is a Symfony bundle, not a Laravel package. It targets Symfony's Bundle / DependencyInjection / Config component model and will not auto-register via Laravel's package discovery, expose a facade, or publish Laravel-style config. In a Laravel codebase it is at best a source of reference code, at worst a composer constraint conflict. The reusable substance — Weglot configuration, API calls, and injection of the Weglot JS snippet — is a thin layer over a SaaS product whose integration is fundamentally a script tag plus a REST call, and both are available without this package.
Integration feasibility. Low for a Laravel target. Three concrete blockers:
http-foundation, console, process, finder, error-handler, etc.). A dormant bundle pinned to an older Symfony minor will either fail composer update or force a downgrade across the framework — a hard stop in most shops.Technical risk. Concentrated in three areas: (a) vendor API drift — Weglot's API and snippet contract have evolved; an archived wrapper cannot track that; (b) client-side fragility — the snippet does DOM rewriting at runtime, so failures surface as untranslated pages rather than exceptions, which is expensive to detect; (c) SEO correctness — hreflang emission, language subdirectory routing, and canonical handling are the parts most likely to be hand-rolled incorrectly and most costly to get wrong.
Key questions to resolve before any code is written
Verdict: do not adopt as a dependency. Its value is as a specification of ~200–400 lines of glue you would write yourself in under a week.
Stack fit. For a Laravel codebase, integrate Weglot directly and skip the bundle entirely:
config/services.php (not hardcoded as the bundle's YAML-era config assumes).WeglotClient service wrapping Laravel's Http client for the translate/status endpoints, bound as a singleton, with retry and timeout policy.This is roughly 1–3 engineer-days plus QA — cheaper than the reconciliation work of forcing a stale Symfony bundle into a Laravel container.
Migration path. If a Symfony app already depends on this bundle, fork it under MIT (permissive, so forking is clean), pin the fork in repositories, and patch the Symfony constraint floor to the version you actually run. Budget 2–3 days for the fork-and-verify cycle plus a regression pass on translated routes. Prefer the fork over a rewrite only if the surrounding Symfony app is itself on a frozen framework version; otherwise reimplement.
Compatibility. Validate explicitly: PHP floor vs. your runtime, symfony/* constraints vs. the versions Laravel or your Symfony app resolves, and Guzzle/HTTP-client duplication. Do not assume a green composer require means a working integration — the bundle's runtime behavior is coupled to Symfony's event dispatcher and request lifecycle, which behave differently under Laravel's kernel.
Sequencing
Exit strategy must be designed in. Keep the Weglot surface behind one interface so the vendor can be swapped. Given the upstream is archived, assume a future migration is likely and price it in now.
Maintenance. Archiving transfers all maintenance to you. Realistic carrying cost for a fork: ~2–4 hours per quarter to track Weglot's API/snippet changes, plus unbudgeted work whenever PHP or framework upgrades force a constraint bump. The direct-integration alternative carries the same Weglot-tracking cost but removes the framework-coupling cost entirely.
Support. There is no upstream maintainer and no CVE feed for this repository. Weglot's commercial support covers the SaaS, the snippet, and the API — it does not cover this bundle, and vendor support staff will not debug a third-party archived wrapper. Escalation paths must be written down: who triages "translations stopped appearing," and against which SLA.
Scaling. Two independent ceilings. Weglot's plan-level page/word and API quotas govern back-end translation throughput; the client-side snippet governs rendering cost and cache behavior per page view. Neither scales linearly with traffic in the way application code does — quota exhaustion and per-request snippet overhead are the practical limits, not CPU. Watch CDN cache hit rate: translated variants double the cache key space and can sharply reduce hit ratios if locale is not normalized.
Failure modes and blast radius
| Failure | Symptom | Detection | Blast radius |
|---|---|---|---|
| Weglot API outage | Untranslated content served | Synthetic check on a translated URL | Public pages, silent |
| Snippet fails/blocked | Page renders in source language | Script-load monitoring, RUM | All localized routes, silent |
| Quota exhaustion | Partial/truncated translation | Vendor dashboard + API 4xx alerts | Content pages |
| hreflang/canonical regression | Duplicate-content warnings | Search Console weekly | SEO, delayed weeks |
| Fork rot on framework upgrade | composer update blocked |
CI | Blocks platform upgrades |
| Locale routing misconfig | Wrong-language pages on deep links | E2E per-locale smoke test | User-facing |
The defining characteristic is silent degradation: this class of integration fails by serving the original language, not by throwing. Monitoring must assert on translated output, not process health.
Ramp-up. Low to moderate for the direct-integration path — a mid-level engineer familiar with Laravel HTTP client and Blade can ship it in a day or two; the learning curve is Weglot's quota and SEO semantics, not the code. The bundle path is higher effort despite being "off the shelf," because the unfamiliar work is Symfony bundle internals plus dependency archaeology on an unmaintained package with no documentation debt paid down by anyone else.
Recommendation. Reject weglot/translate-bundle as a dependency: it is archived, framework-mismatched for the stated Laravel context, and has no adoption base. Treat it as a design reference, integrate Weglot directly behind an internal interface, and allocate the saved effort to observability and SEO validation — where the real operational risk sits. Revisit only if the target is confirmed as a frozen Symfony application, in which case fork under MIT and pin.
How can I help you explore Laravel packages today?