PHPackages                             sadonsergey/yc-ml-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. [API Development](/categories/api)
4. /
5. sadonsergey/yc-ml-translate

ActiveLibrary[API Development](/categories/api)

sadonsergey/yc-ml-translate
===========================

Yandex ML Translate for Yandex Cloud (AI API)

1.0.3(5y ago)0461[1 PRs](https://github.com/sadonsergey/yc-ml-translate/pulls)MITPHPPHP ^7.2.5CI failing

Since Jul 12Pushed 2y agoCompare

[ Source](https://github.com/sadonsergey/yc-ml-translate)[ Packagist](https://packagist.org/packages/sadonsergey/yc-ml-translate)[ Docs](https://github.com/sadonsergey/yc-ml-translate)[ RSS](/packages/sadonsergey-yc-ml-translate/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Yandex ML Translate for Yandex Cloud (AI API)
=============================================

[](#yandex-ml-translate-for-yandex-cloud-ai-api)

- [API Documentation](https://cloud.yandex.ru/docs/translate/api-ref/)
- [Get API keys](https://cloud.yandex.ru/docs/translate/api-ref/authentication)

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

[](#installation)

```
composer require "sadonsergey/yc-ml-translate"
```

Usage
-----

[](#usage)

- You must use one of two tokens, if an OAuth token is used then we will exchange it for an IAM token. However, we will have to do this every time we request a transfer, we recommend using the IAM token.
- You can get an IAM token yourself [here](https://cloud.yandex.ru/docs/iam/operations/iam-token/create)
- $OAuthToken is optional if there is a $ IAMToken.
- $folderId is required. The ID of the directory to which you have access. Required for authorization with a user account (see UserAccount resource). Do not use this field if you are making a request on behalf of a service account.

> The lifetime of an IAM token is no more than 12 hours, but it is recommended to request it more often, for example, every hour.

```
$yandexTranslate = new ssadon\YandexTranslate($OAuthToken, $IAMToken, $folderId);

//Translating text
$text = $yandexTranslate->translate('en', 'ru', 'cat');
echo $text['text']; //кошка

//You can use multiple translation
$text = $yandexTranslate->translate('en', 'ru', ['cat', 'dog']);
echo $text[0]['text']; //кошка
echo $text[1]['text']; //собака

//Detecting language
$detect = $yandexTranslate->detectLanguage('English text');
echo $detect; //en
```

> You can also see how this works on the basis of tests. Do not forget to start them before you start working.

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

4

Last Release

2180d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11750848?v=4)[Sergey Sadon](/maintainers/sadonsergey)[@sadonsergey](https://github.com/sadonsergey)

---

Top Contributors

[![sadonsergey](https://avatars.githubusercontent.com/u/11750848?v=4)](https://github.com/sadonsergey "sadonsergey (6 commits)")

---

Tags

googletranslateyandexapitranslatecloudaiyandexmllearningmachine

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sadonsergey-yc-ml-translate/health.svg)

```
[![Health](https://phpackages.com/badges/sadonsergey-yc-ml-translate/health.svg)](https://phpackages.com/packages/sadonsergey-yc-ml-translate)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74331.3k1](/packages/mozex-anthropic-laravel)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

642.3k](/packages/rubix-server)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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