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 Google Translate

Laravel Google Translate Laravel Package

joggapp/laravel-google-translate

Laravel Google Translate provides a simple wrapper around Google Cloud Translation for translating text and detecting languages in PHP apps. Configure credentials and locale, then use the facade or helper to translate strings, batch text, and integrate multilingual content quickly.

View on GitHub
Deep Wiki
Context7

This package makes using the Google Translate API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API.

Frequently asked questions about Laravel Google Translate
How do I install joggapp/laravel-google-translate in a Laravel app?
Install the package with Composer using composer require joggapp/laravel-google-translate. Laravel package discovery should register the service provider automatically, but you can add it manually if your app disables discovery. After installation, publish the package configuration and add your Google Cloud Translation credentials. Check the README for the exact provider class and config publish tag.
Which Laravel and PHP versions does this package support?
Version support is defined in the package composer.json, so check its illuminate/support and PHP constraints before installing. The v9.0.0 major release may also have raised PHP or Laravel minimums, which would not necessarily be obvious from the one-line changelog. If you are on an older Laravel version, pin the last major release that explicitly lists your framework version.
How do I configure Google Cloud credentials for Laravel Google Translate?
Create a Google Cloud service account with the Cloud Translation API enabled and download its JSON key. Point the package config or your environment at that credentials file, typically through Google application default credentials. Set the source and target locale values in the published config and clear Laravel's config cache after making changes.
How do I translate a string with the facade or helper?
After configuration, resolve the package facade or call the provided helper to translate a string. Pass the text and target locale according to the README method signature, and the wrapper will handle the Google Cloud Translation call. Because v9 renamed a method, confirm the exact callable name in the README or source before writing new code.
Can I translate multiple strings at once with this package?
The package supports translating multiple strings in one call, which is preferable to looping over single translations for lists of labels or short UI strings. Check the README for the batch method signature and response shape. Keep request sizes reasonable because Google Cloud Translation has quotas and per-request limits.
How do I detect the language of a piece of text?
Language detection is one of the package's core features alongside translation. Call the detection method exposed by the facade or helper and pass the text you want to inspect. The response should provide the detected language and confidence information from Google Cloud Translation.
What changed in joggapp/laravel-google-translate v9.0.0?
The v9.0.0 release note says it fixes a method name, and a major version bump for a rename strongly suggests a breaking public API change. Confirm which method was renamed, whether it was public, and whether v9 ships a backward-compatible alias or deprecation shim. Do not assume a find-and-replace is enough, because dynamic calls and config-driven method strings can evade static analysis.
How should I upgrade from v8 to v9 safely?
Pin the package to ~8.0 first so an uncontrolled v9 cannot enter your build on the next composer update. Grep your code and infrastructure configs for the old method name, including string literals, then upgrade one low-traffic service to ^9.0 and run the full test suite. Diff the lock file and test dynamic call paths, queue workers, and Blade or container-resolved callables before rolling out further.
How do I test translations without calling the Google API?
Mock the underlying Google Cloud Translation client or the package facade in feature tests so CI does not call the real API. The package wrapper should be resolved from Laravel's container, which makes it replaceable with a fake or stub in tests. Add at least one assertion around the method name you use, especially after the v9 rename.
What should I check before using this package in production?
Review the GitHub repository, Packagist metadata, recent commits, open issues, and whether v8.x still receives patches before adopting it. The v9.0.0 one-line changelog for a major release is a release-process smell, so treat future upgrades as diff-review work rather than trusting semver alone. Also account for Google Cloud Translation billing, quotas, and alternatives such as the official google/cloud-translate PHP client or a translation management service.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package