PHPackages                             richweber/yii2-google-translate-api - 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. [API Development](/categories/api)
4. /
5. richweber/yii2-google-translate-api

ActiveYii2-extension[API Development](/categories/api)

richweber/yii2-google-translate-api
===================================

Yii2 extension to Google Translate API

1.0.0(11y ago)642.5k↓23.1%3BSD-3-ClausePHP

Since Feb 18Pushed 11y ago3 watchersCompare

[ Source](https://github.com/RichWeber/yii2-google-translate-api)[ Packagist](https://packagist.org/packages/richweber/yii2-google-translate-api)[ RSS](/packages/richweber-yii2-google-translate-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Yii2 extension to Google Translate API
======================================

[](#yii2-extension-to-google-translate-api)

Google Translate API

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require richweber/yii2-google-translate-api "dev-master"

```

or add

```
"richweber/yii2-google-translate-api": "dev-master"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Identifying your application to Google

[](#identifying-your-application-to-google)

If you haven't done so already, create your project's API key by following these steps:

1. Go to the [Google Developers Console](https://console.developers.google.com/?_ga=1.82915478.1231386659.1424296121).
2. Select a project, or create a new one.
3. In the sidebar on the left, **expand APIs &amp; auth**. Next, click **APIs**. In the list of APIs, make sure the status is **ON** for the Google Translate API.
4. In the sidebar on the left, select **Credentials**.
5. To create an API key, click **Create new Key** and select the appropriate key type. Enter the additional information required for that key type and click **Create**.

[Read more...](https://cloud.google.com/translate/v2/using_rest)

### Component Configuration

[](#component-configuration)

```
'components' => [
    ...
    'translate' => [
        'class' => 'richweber\google\translate\Translation',
        'key' => 'INSERT-YOUR-API-KEY',
    ],
    ...
],
```

```
Yii::$app->translate->translate($source, $target, $text);
```

```
Yii::$app->translate->discover();
```

```
Yii::$app->translate->detect($text);
```

### License

[](#license)

**yii2-twitter** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

Unknown

Total

1

Last Release

4107d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1702252?v=4)[Roman Bahatyi](/maintainers/RichWeber)[@RichWeber](https://github.com/RichWeber)

---

Top Contributors

[![RichWeber](https://avatars.githubusercontent.com/u/1702252?v=4)](https://github.com/RichWeber "RichWeber (5 commits)")

---

Tags

apitranslategoogleyii2

### Embed Badge

![Health badge](/badges/richweber-yii2-google-translate-api/health.svg)

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

###  Alternatives

[statickidz/php-google-translate-free

Google Translate Free library for PHP

289258.8k6](/packages/statickidz-php-google-translate-free)[dejurin/php-google-translate-for-free

Library for free use Google Translator. With attempts connecting on failure and array support.

13943.0k2](/packages/dejurin-php-google-translate-for-free)[eko/googletranslatebundle

A Symfony bundle to deals with Google Translate API

4337.1k](/packages/eko-googletranslatebundle)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)

PHPackages © 2026

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