New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

datlechin/laravel-google-translate

Free Google Translate API for Laravel application.
54,231 9
Install
composer require datlechin/laravel-google-translate
Latest Version:v1.0.0
PHP:^8.1
Laravel:10 · 11 · 12
License:MIT
Last Updated:Jan 18, 2026
Links: GitHub  ·  Packagist
Maintainer: Ngô Quốc Đạt

Laravel Google Translate

Latest Version on Packagist Total Downloads

This package allows you to free translate your Laravel app easily using the Google Translate API.

Installation

You can install the package via composer:

composer require datlechin/laravel-google-translate

Usage

use Datlechin\GoogleTranslate\Facades\GoogleTranslate;

// Using facade
$result = GoogleTranslate::source('en')
    ->target('vi')
    ->translate('Hello world!');

$result->translatedText(); // Chào thế giới!

$result->getAlternativeTranslations();
//[
//    [
//        0 => 'Chào thế giới!',
//        1 => 'Xin chào thế giới!',
//        2 => 'Chào cả thế giới!',
//    ],
//]

$result->getSourceText(); // Hello world!
$result->getSourceLanguage(); // en

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email datlechin@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

jellybool/translug

Translate Chinese And Then Make It Sluggable

47,180 145
rafaph/twig-translation-extension

Twig translate function for Illuminate\Translation\Translator.

6,544 4
ozankurt/google-translate

Laravel 5 Google Translate

415 0
mammut-alex/polyglot

Translate model column in laravel

1,929 2
ddctd143/google-translate

Free Laravel package for Paid Google Translate REST API

1,560 0

Version History

Version Released PHP Laravel License
v1.0.0 ^8.1 ^10.0|^11.0|^12.0 MIT
v0.2.0 ^8.1 ^10.0|^11.0 MIT
V0.1.0 ^8.1 ^10.0|^11.0 MIT
v0.0.2 ^8.1 ^10.0 MIT
v0.0.1 ^8.1 ^10.0 MIT