PHPackages                             itsmattburgess/laravel-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. itsmattburgess/laravel-translate

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

itsmattburgess/laravel-translate
================================

Populate laravel translation files using services such as Google Translate

3.0.1(5y ago)222.5k3[3 PRs](https://github.com/itsmattburgess/laravel-translate/pulls)MITPHPPHP &gt;=7.3

Since Apr 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/itsmattburgess/laravel-translate)[ Packagist](https://packagist.org/packages/itsmattburgess/laravel-translate)[ RSS](/packages/itsmattburgess-laravel-translate/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (2)Versions (9)Used By (0)

Laravel Translate
=================

[](#laravel-translate)

[![Build](https://camo.githubusercontent.com/5f8b858c96a9dd6bfe2e2b2ff5ffc2e219dcd6efe55141fdcd93cc0330fd8590/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6974736d617474627572676573732f6c61726176656c2d7472616e736c6174652e737667)](https://camo.githubusercontent.com/5f8b858c96a9dd6bfe2e2b2ff5ffc2e219dcd6efe55141fdcd93cc0330fd8590/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6974736d617474627572676573732f6c61726176656c2d7472616e736c6174652e737667)[![Code Quality](https://camo.githubusercontent.com/a4b55eae2ee2da75793982ab605c2ef76a0f23e21a63531d1394c40cdd2af1cc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6974736d617474627572676573732f6c61726176656c2d7472616e736c6174652e737667)](https://camo.githubusercontent.com/a4b55eae2ee2da75793982ab605c2ef76a0f23e21a63531d1394c40cdd2af1cc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6974736d617474627572676573732f6c61726176656c2d7472616e736c6174652e737667)[![Coverage](https://camo.githubusercontent.com/5ede44296816ec25c74a3e998ac59e0b3c13635c4d8516a3cab1d39517680ab4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6974736d617474627572676573732f6c61726176656c2d7472616e736c6174652e737667)](https://camo.githubusercontent.com/5ede44296816ec25c74a3e998ac59e0b3c13635c4d8516a3cab1d39517680ab4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6974736d617474627572676573732f6c61726176656c2d7472616e736c6174652e737667)

Easily translate your laravel application using cloud translation APIs. This package finds all of your `__()` and `trans()`methods in your `app/` and `resources/` directories and translates each string using the API. Online translation APIs aren't perfect however, so its recommended that this package is used to give you a good starting point. Packages such as [barryvdh/laravel-translation-manager](https://github.com/barryvdh/laravel-translation-manager)and [joedixon/laravel-translation](https://github.com/joedixon/laravel-translation) can then be used to fine-tune your translations.

Installing
----------

[](#installing)

Installation is achieved using composer

```
composer require --dev itsmattburgess/laravel-translate

```

### Configuration

[](#configuration)

You can configure how this package is implemented using the config file in `config/translate.php`. You first need to publish this config file using the command below:

```
php artisan vendor:publish --provider="itsmattburgess\LaravelTranslate\TranslationServiceProvider"

```

In this config file, you can specify the methods that contain your translation strings, the path where your methods should be discovered in, and which languages you want to translate into.

The package currently only supports the Google Translate API.

To use the Google Translate API you need to set your API key. You can obtain an API key from your [Google Cloud Console](https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials). Once generated, add your key to your `.env` file.

```
GOOGLE_TRANSLATE_API_KEY=XXXXXX

```

Usage
-----

[](#usage)

Once you have set your API key and set the languages you want to translate into, you're ready start processing. Run the following command to start processing. It will detect your translation methods and create the language files in `resources/lang/`. If you already have these files defined, it will override any matching keys with an updated translation.

```
php artisan translate

```

### Pricing warning

[](#pricing-warning)

Online translation providers, such as Google, charge for usage of their APIs. Check their pricing carefully, you are responsible for any charges incurred.

Contributing
------------

[](#contributing)

Contributions are welcome. If you've spotted a bug, would like to add a new feature or implement a new service, please submit a pull request with associated test coverage. I'll review any pull requests as quickly as I can.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 82.9% 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 ~186 days

Total

5

Last Release

1835d ago

Major Versions

1.0.1 → 2.0.02020-08-15

2.0.0 → 3.0.02021-03-12

PHP version history (3 changes)1.0.0PHP &gt;=7.1

2.0.0PHP &gt;=7.2

3.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b2feaabd27c7bc395f1266defa5c1d200d0d9e12e737562f3707a1b6c01141c?d=identicon)[itsmattburgess](/maintainers/itsmattburgess)

---

Top Contributors

[![mtburge](https://avatars.githubusercontent.com/u/928932?v=4)](https://github.com/mtburge "mtburge (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

google-translatei18nlanguageslaravellaravel-translationlocalizationtranslationlaravelintltranslationstranslate

### Embed Badge

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

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

###  Alternatives

[outl1ne/nova-translatable

A laravel-translatable extension for Laravel Nova.

203416.9k8](/packages/outl1ne-nova-translatable)[om/potrans

Command line tool for translate Gettext with Google Translator API or DeepL API

10515.0k4](/packages/om-potrans)

PHPackages © 2026

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