PHPackages                             nagandev/symfony-google-translate-bundle - 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. nagandev/symfony-google-translate-bundle

ActiveSymfony-bundle[Localization &amp; i18n](/categories/localization)

nagandev/symfony-google-translate-bundle
========================================

Symfony Translator using google

0123PHP

Since Jul 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jokashongwe/symfony-google-translate)[ Packagist](https://packagist.org/packages/nagandev/symfony-google-translate-bundle)[ RSS](/packages/nagandev-symfony-google-translate-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Symfony | Free Google Translator Bundle based on
============================================================================================================

[](#symfony--free-google-translator-bundle-based-on-httpsgithubcomsabrihamdash-google-translator-bundle)

> 5000 words maximum

This bundle will allow you to translate your symfony application instantly and with a single command line in all languages ​​supported by google.

Installing / Getting started
----------------------------

[](#installing--getting-started)

To use this bundle you would need two symfony4 components.
`Twig & Translations.`
Cause the bundle will looking for `{{'the string to translate'|trans}}` in the `/Templates` directory by fetching all files with the `.twig` extension.

### Installation with composer

[](#installation-with-composer)

Using [symfony/flex](https://github.com/symfony/flex).

> 1 - Install Twig

```
php composer require twig
```

> 2 - Install Translations

```
php composer require translations
```

> Finaly - Install Google Translator Bundle

```
php composer require sabrihamda/google-translator-bundle
```

### Initial Configuration

[](#initial-configuration)

> Templates

To safly start with this bundle, be sure that all the words to be translated are passed to the Translations component like this:
`{{ 'string to translate'|trans }}`

> Example:
> [![](https://camo.githubusercontent.com/aa4060d4358f0c461f2896ab161677ecae70497aac76c5ed1a0400eaf94341ee/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f68616d64612d63682f696d6167652f75706c6f61642f635f7363616c652c665f6175746f2c715f3130302c775f313030302f76313535363635343531312f4749544855422f474f4f474c452d5452414e534c41544f522f747769672d6578616d706c652d312e706e67)](https://camo.githubusercontent.com/aa4060d4358f0c461f2896ab161677ecae70497aac76c5ed1a0400eaf94341ee/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f68616d64612d63682f696d6167652f75706c6f61642f635f7363616c652c665f6175746f2c715f3130302c775f313030302f76313535363635343531312f4749544855422f474f4f474c452d5452414e534c41544f522f747769672d6578616d706c652d312e706e67)

> Config

Go to `./config/packages/translation.yaml` and add your target languages.

> Example:
> [![](https://camo.githubusercontent.com/de8f011ac934c4a2609c496b37f1589b68f8f17d1eadba2726cf04c9b379291b/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f68616d64612d63682f696d6167652f75706c6f61642f635f7363616c652c665f6175746f2c715f3130302c775f313030302f76313535363635343531312f4749544855422f474f4f474c452d5452414e534c41544f522f7472616e736c6174696f6e2d6578616d706c652d312e706e67)](https://camo.githubusercontent.com/de8f011ac934c4a2609c496b37f1589b68f8f17d1eadba2726cf04c9b379291b/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f68616d64612d63682f696d6167652f75706c6f61642f635f7363616c652c665f6175746f2c715f3130302c775f313030302f76313535363635343531312f4749544855422f474f4f474c452d5452414e534c41544f522f7472616e736c6174696f6e2d6578616d706c652d312e706e67)

That's it :)

### Run the command

[](#run-the-command)

Go to your command line and run the command:

```
php bin/console google:translate
```

[![](https://camo.githubusercontent.com/2a3414c4947923fc64d1f32e7ff8ca6ef4846fc54feb50b000ca1d86ff31b255/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f68616d64612d63682f696d6167652f75706c6f61642f635f7363616c652c665f6175746f2c715f3130302c775f313030302f76313535363635343531312f4749544855422f474f4f474c452d5452414e534c41544f522f636f6d6d616e642d6c696e652d6578616d706c652d312e706e67)](https://camo.githubusercontent.com/2a3414c4947923fc64d1f32e7ff8ca6ef4846fc54feb50b000ca1d86ff31b255/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f68616d64612d63682f696d6167652f75706c6f61642f635f7363616c652c665f6175746f2c715f3130302c775f313030302f76313535363635343531312f4749544855422f474f4f474c452d5452414e534c41544f522f636f6d6d616e642d6c696e652d6578616d706c652d312e706e67)

All the messages files will be generated in the `./translation` directory.

Licensing
---------

[](#licensing)

> The code in this project is licensed under MIT license.

Copyright (c) 2024 Jonathan Kashongwe

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/75a62d92e1f9e27b6a3012b1d7dfccbc9728ac22148709eeb23da09b7f3adffd?d=identicon)[nagandev](/maintainers/nagandev)

---

Top Contributors

[![SabriHamda](https://avatars.githubusercontent.com/u/32013306?v=4)](https://github.com/SabriHamda "SabriHamda (36 commits)")[![jokashongwe](https://avatars.githubusercontent.com/u/34185597?v=4)](https://github.com/jokashongwe "jokashongwe (14 commits)")

### Embed Badge

![Health badge](/badges/nagandev-symfony-google-translate-bundle/health.svg)

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

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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