- How do I install kargnas/laravel-ai-translator in a Laravel app?
- Install it with Composer using composer require kargnas/laravel-ai-translator, then publish the package config and add credentials for your chosen AI provider. The package is config- and service-provider-driven, so it follows standard Laravel conventions. Before rolling it out, check the package's composer.json against your Laravel and PHP versions and run one translation in a branch to inspect the generated diff.
- Which AI providers does laravel-ai-translator support?
- The package overview names OpenAI, Anthropic (Claude), and other providers. In version 1.7.22, OpenRouter became the default provider, so a fresh install may route through OpenRouter unless you explicitly configure another provider. Confirm the supported provider list and model names in the published config for your installed version.
- Does laravel-ai-translator translate both PHP and JSON language files?
- Yes. The package is described as scanning PHP and JSON localization files, finding missing translations, and generating them through an AI provider. That covers both traditional lang PHP files and JSON translation files. Run it against a branch and review the diff, because generated strings still need linguistic and contextual review.
- Why did my translations start using OpenRouter after updating to 1.7.22?
- Version 1.7.22 changed the default provider to OpenRouter in a patch release, so existing installs that relied on the previous default can start routing through a different gateway after a composer update. Pin the provider you want explicitly in config rather than relying on the default. The technical assessment flags this as the highest-impact change in that release.
- Is the OpenRouter default in 1.7.22 a breaking change?
- Treat it as one unless the maintainer documents it otherwise. A default provider switch on a semver-patch changes model naming, pricing, and failure behavior without a major-version signal. Pin 1.7.21 to capture a baseline, upgrade in an isolated branch, and explicitly set your previous provider in config before accepting 1.7.22.
- How does live model pricing fetching affect artisan commands and CI?
- The assessment says 1.7.22 loads model pricing live, which adds egress to a third-party endpoint during normal operation. It is unclear from the changelog whether that call is cached, has a timeout, or has an offline fallback. That matters for artisan command latency, cost estimates, and CI runners with restricted network access, so test those paths before relying on it.
- Which Laravel and PHP versions are supported by laravel-ai-translator?
- The provided release context does not include a tested Laravel or PHP support matrix. The 1.7.22 changelog allows symfony/process ^8.0, which widens the dependency envelope, but that is not proof of tested combinations. Check composer.json, run Composer's dependency resolution against your app, and verify in a CI matrix before upgrading.
- How do I find and fill only missing translations?
- The package is designed to scan localization files, detect missing translations, and generate them via AI. It is aimed at keeping locale files in sync rather than translating arbitrary strings at runtime. Check the package commands and config for the exact missing-only behavior in your version, and review generated values before committing them.
- Can I use laravel-ai-translator at runtime for per-request translation?
- No. The technical assessment explicitly says it is not a fit for runtime, per-request translation because of latency, cost, and third-party availability. It fits build, CI, or queue-adjacent workflows where locale files are tracked in version control and changes go through review. Keep AI calls out of the request path.
- Is kargnas/laravel-ai-translator safe for production and well maintained?
- The assessment is provisional and based only on the 1.7.22 changelog, not source or test-coverage review. It notes maintainer concentration, a single primary author plus a first-time contributor, and a behavioral change shipped in a patch release, so pin versions, review diffs, and gate upgrades on tests. Also verify the license, release cadence, and the maintainer's policy for patch-level behavioral changes before production use.