PHPackages                             neoteknic/laravel-google-translate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. neoteknic/laravel-google-translate

ActiveLibrary[Localization &amp; i18n](/categories/localization)

neoteknic/laravel-google-translate
==================================

Translate translation files to other languages using google translate api

2.0.7(4y ago)07MITPHPPHP &gt;=8.0.0

Since Dec 11Pushed 4y agoCompare

[ Source](https://github.com/neoteknic/laravel-google-translate)[ Packagist](https://packagist.org/packages/neoteknic/laravel-google-translate)[ Patreon](https://www.patreon.com/tanmuhittin)[ RSS](/packages/neoteknic-laravel-google-translate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (29)Used By (0)

laravel-google-translate
========================

[](#laravel-google-translate)

- Translate translation files (under /resources/lang) or lang.json files
- Provide extra facade functions Str::apiTranslate and Str::apiTranslateWithAttributes

by using stichoza/google-translate-php or Google Translate API  or Yandex Translatin API

Str facade api-translation helpers
----------------------------------

[](#str-facade-api-translation-helpers)

This package provides two translation methods for Laravel helper Str

- `Illuminate\Support\Str::apiTranslate` -&gt; Translates texts using your selected api in config
- `Illuminate\Support\Str::apiTranslateWithAttributes` -&gt; Again translates texts using your selected api in config in addition to that this function ***respects Laravel translation text attributes*** like :name

how to use your own translation api
-----------------------------------

[](#how-to-use-your-own-translation-api)

- Create your own translation api class by implementing Tanmuhittin\\LaravelGoogleTranslate\\Contracts\\ApiTranslatorContract
- Write your classname in config laravel\_google\_translate.custom\_api\_translator . Example : Myclass::class
- Write your custom apikey for your custom class in laravel\_google\_translate.custom\_api\_translator\_key

Now all translations will use your custom api.

installation
------------

[](#installation)

```
composer require tanmuhittin/laravel-google-translate
php artisan vendor:publish --provider="Tanmuhittin\LaravelGoogleTranslate\LaravelGoogleTranslateServiceProvider"
```

If you would like to use stichoza/google-translate-php you do not need an API key. If you would like to use Google Translate API, edit config/laravel\_google\_translate.php and add your Google Translate API key.

```
php artisan config:cache
```

Then you can run

```
php artisan translate:files
```

See it on action:

[![laravel-google-translate](https://camo.githubusercontent.com/982b85254798c3f8bb4ecbff178fe3383323e66202d82b40716ffd5296b3e6f6/687474703a2f2f6d7568697474696e74616e2e636f6d2f74616e6d7568697474696e2d6c61726176656c2d676f6f676c652d7472616e736c6174652e676966)](https://camo.githubusercontent.com/982b85254798c3f8bb4ecbff178fe3383323e66202d82b40716ffd5296b3e6f6/687474703a2f2f6d7568697474696e74616e2e636f6d2f74616e6d7568697474696e2d6c61726176656c2d676f6f676c652d7472616e736c6174652e676966)

potential issues
----------------

[](#potential-issues)

### SSL certificate problem: unable to get local issuer certificate

[](#ssl-certificate-problem-unable-to-get-local-issuer-certificate)

suggested packages
------------------

[](#suggested-packages)

This package can be used with .

- Add base Laravel translation files using
- Translate your custom files using this package

Done

finally
-------

[](#finally)

Thank you for using laravel-google-translate :)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 87.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~135 days

Total

24

Last Release

1547d ago

Major Versions

0.11 → 1.0.02019-05-23

0.12 → 1.0.12019-06-13

1.0.4 → 2.0.02020-06-26

PHP version history (2 changes)0.1PHP &gt;=7.0.0

2.0.7PHP &gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9203a1ab15f799af89ce0a4b530404271d09b7a1946374499b6ced834fb4c851?d=identicon)[neoteknic](/maintainers/neoteknic)

---

Top Contributors

[![tanmuhittin](https://avatars.githubusercontent.com/u/7202383?v=4)](https://github.com/tanmuhittin "tanmuhittin (83 commits)")[![neoteknic](https://avatars.githubusercontent.com/u/1809652?v=4)](https://github.com/neoteknic "neoteknic (5 commits)")[![DanielMalmgren](https://avatars.githubusercontent.com/u/2837262?v=4)](https://github.com/DanielMalmgren "DanielMalmgren (1 commits)")[![exussum12](https://avatars.githubusercontent.com/u/1102850?v=4)](https://github.com/exussum12 "exussum12 (1 commits)")[![ahkmunna](https://avatars.githubusercontent.com/u/9366303?v=4)](https://github.com/ahkmunna "ahkmunna (1 commits)")[![kaneymhf](https://avatars.githubusercontent.com/u/15618401?v=4)](https://github.com/kaneymhf "kaneymhf (1 commits)")[![kaziu687](https://avatars.githubusercontent.com/u/1757563?v=4)](https://github.com/kaziu687 "kaziu687 (1 commits)")[![JoshKisb](https://avatars.githubusercontent.com/u/7253780?v=4)](https://github.com/JoshKisb "JoshKisb (1 commits)")[![buzzclue](https://avatars.githubusercontent.com/u/43321373?v=4)](https://github.com/buzzclue "buzzclue (1 commits)")

### Embed Badge

![Health badge](/badges/neoteknic-laravel-google-translate/health.svg)

```
[![Health](https://phpackages.com/badges/neoteknic-laravel-google-translate/health.svg)](https://phpackages.com/packages/neoteknic-laravel-google-translate)
```

###  Alternatives

[tanmuhittin/laravel-google-translate

Translate translation files to other languages using google translate api

4312.2M11](/packages/tanmuhittin-laravel-google-translate)[barryvdh/laravel-translation-manager

Manage Laravel Translations

1.7k3.6M17](/packages/barryvdh-laravel-translation-manager)[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[laravel-lang/json-fallback

Adds support for fallback JSON string translation

162.2M4](/packages/laravel-lang-json-fallback)[kerigard/laravel-lang-ru

Ru lang for Laravel

2116.8k](/packages/kerigard-laravel-lang-ru)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
