Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Deepl Laravel Package

simonet85/laravel-deepl

Laravel integration for the DeepL translation API. Add your API key via config, then translate text between supported languages from your application using a simple, framework-friendly wrapper around DeepL's translation endpoints, including source and target language selection.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Market/expansion sequencing. Adding a locale becomes a configuration and content decision rather than a staffing decision. php artisan deepl:translate {locale} backfills lang/{locale}.json, so the question shifts from "can we afford translators for locale X?" to "is a machine-translated first pass good enough to ship in locale X?" — a much cheaper question to answer per market.
  • Build vs. buy for localization plumbing. This is a thin, focused wrapper over the official deeplcom/deepl-php SDK: facade, cache, placeholder protection, two artisan commands. The realistic build alternative is ~150–300 lines of internal glue plus on-call ownership. Buying the package (free, OSS) is the obvious call unless you already run a translation management system.
  • Feature-level cost modeling. Because a previously translated string is never billed twice and php artisan deepl:usage reports monthly character consumption, you can attach a real cost estimate to "ship locale Y" and to "add these 40 new strings next sprint." Localization stops being an unbudgeted surprise.
  • Release cadence for localized products. The missing-key backfill command (with --dry-run and --force) means every feature release can carry its own string delta into all locales as a CI/pre-release step, instead of batching localization into a quarterly project. --scan= plus harvesting keys from all lang/*.json covers dynamically constructed keys, which is the usual reason localization drifts.
  • Tiering content by translation quality. Batch translation with configurable formality and context lets you set a different bar for admin/internal strings (machine is fine) versus marketing, legal, and checkout copy (human review required). That tiering is a product decision this package makes affordable to enforce only where it matters.
  • Risk-reduction decisions that are cheap to defer. Placeholder protection (:count etc.) and escaping of & < > remove the most common class of translated-UI regressions, so QA sign-off on a new locale doesn't require a bespoke regression pass.
  • Vendor and quota governance. Automatic Free (:fx) vs. Pro key detection means pilots can run on the free tier before any procurement, which is a useful de-risking step for a "prove the market first" roadmap bet.

When to Consider This Package

Good fit when:

  • You are on PHP 8.2+ and Laravel 11, 12, or 13, and your user-facing strings live in JSON/lang files — this package's whole model assumes that.
  • You want a first-pass translation of UI strings, not a managed localization workflow. Speed and low marginal cost beat stylistic polish.
  • Engineering owns localization today and you want it to stay a background concern rather than a headcount or a vendor contract.
  • You need a cheap pilot: free-tier DeepL keys work out of the box, and the cache means an exploratory run against a large catalog doesn't produce a surprising bill.
  • Your team is comfortable managing a DeepL API key, a cache store, and a scheduled deepl:usage check.

Look elsewhere when:

  • You need review/approval workflows, translator roles, glossaries with enforcement, translation memory shared across products, or per-string sign-off — that is a TMS (Phrase, Lokalise, Crowdin), not this.
  • Content to translate lives in a CMS/database, in front-end JS bundles, or in emails/marketing copy managed by non-engineers. This package does not see those.
  • You require multi-vendor translation (e.g., DeepL plus an LLM fallback) or on-prem/self-hosted MT; DeepL is the only provider here.
  • You are on Laravel 10 or older, or PHP below 8.2.
  • Bus factor matters: this is v1.0.0 under a single maintainer (per the Composer namespace). If localization becomes business-critical, assume you may need to fork or absorb the ~300 lines.
  • You need SLAs, support contracts, or guaranteed API-stability commitments.

Adoption caveats to state explicitly: v1.0.0 is the first public release, so treat the facade surface as stable-in-intent but not battle-tested; pin the version. The --scan= heuristic parses source for keys, which can over-collect and inflate spend — always run --dry-run first and inspect the diff. And "configured context/formality" is a quality dial, not a substitute for review on customer-facing copy.

How to Pitch It (Stakeholders)

To executives: Localization is currently gated on human translator cost and scheduling, which makes each new market a slow, expensive bet. This package turns it into a per-locale operating cost we can measure before committing: a free-tier pilot, an exact monthly character quota we can monitor via php artisan deepl:usage, and no charge for re-translating strings we've already translated. It does not replace professional translation for brand, legal, or checkout copy — it lets us spend that budget only where it changes outcomes, and it makes shipping a "good enough" locale a decision we can reverse cheaply.

To engineering: Small, boring, low-risk addition. It's a thin wrapper over DeepL's official PHP SDK — a DeepL facade (translate(), usage()), a translation cache, protection for Laravel :placeholders and & < >, and two commands: deepl:translate {locale} to backfill missing keys (with --dry-run, --force, --scan=) and deepl:usage for monthly consumption. Batches 50 strings per request, auto-detects Free vs. Pro keys. Requires PHP 8.2+ and Laravel 11–13; install is composer require plus an optional config publish. Work needed from us: API key in secrets, a cache store with a sane TTL, and wiring deepl:translate --dry-run into the pre-release checklist before it becomes automatic. Version-pin it — it's a fresh v1.0.0 with a single maintainer, so the integration should stay behind a thin seam we could fork if needed.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator