PHPackages                             haotx/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. [Localization &amp; i18n](/categories/localization)
4. /
5. haotx/translate-api

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

haotx/translate-api
===================

Support translate text

1.0.0(9y ago)041MITPHPPHP &gt;=5.5.9

Since Jun 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/tranxuanhao2001/translate-api)[ Packagist](https://packagist.org/packages/haotx/translate-api)[ RSS](/packages/haotx-translate-api/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/674b53b8188556932fb9c6ed5d6576af27b61a2e0ad135313c2a02219f342588/68747470733a2f2f706f7365722e707567782e6f72672f68616f74782f7472616e736c6174652d6170692f646f776e6c6f616473)](https://packagist.org/packages/haotx/translate-api)

TranslateApi
============

[](#translateapi)

Translate 1.0.0 for PHP

This package is a wrapper of [Translate Yandex](https://tech.yandex.com/translate/doc/dg/concepts/About-docpage/) adapted to work with PHP.

Installation
============

[](#installation)

```
    composer require "haotx/translate-api:1.*"
```

Usage translate Yandex
======================

[](#usage-translate-yandex)

\[Get your api key of Yandex\] ()

Translate the text (Don't support translate multi text)

```
use TranslateApi\Translate;
use TranslateApi\TranslateYandex;

$provider = new TranslateYandex($yourKeyApi);

$translate = new Translate($provider);
$result = $translate->translate('Hello world', 'en', 'vi');
```

Detect language the text

```
use TranslateApi\Translate;
use TranslateApi\TranslateYandex;

$provider = new TranslateYandex($yourKeyApi);

$translate = new Translate($provider);
$result = $translate->detect('Hello world');
```

Get supported languages

```
use TranslateApi\Translate;
use TranslateApi\TranslateYandex;

$provider = new TranslateYandex($yourKeyApi);

$translate = new Translate($provider);
$result = $translate->getSupportedLanguages(['ui' => 'en']);
```

Translate Yandex
================

[](#translate-yandex)

See more api of Yandex [look here](https://tech.yandex.com/translate/doc/dg/concepts/About-docpage/).

###  Health Score

26

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

3577d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d856419027c37aef47cc737629cead9f4d275213459ef8214b3e670b84d1308?d=identicon)[tranxuanhao2001](/maintainers/tranxuanhao2001)

---

Top Contributors

[![tranxuanhao2001](https://avatars.githubusercontent.com/u/12896369?v=4)](https://github.com/tranxuanhao2001 "tranxuanhao2001 (2 commits)")

---

Tags

php

### Embed Badge

![Health badge](/badges/haotx-translate-api/health.svg)

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

###  Alternatives

[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

541629.5k3](/packages/codezero-laravel-localized-routes)[pharaonic/laravel-locations

Laravel - Countries\[States/Cities, Currency, Phone Code, Languages, Capital\] &amp; Continents &amp; Timezones.

102.3k1](/packages/pharaonic-laravel-locations)

PHPackages © 2026

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