PHPackages                             lambq/baidu-translation - 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. lambq/baidu-translation

ActiveLibrary[API Development](/categories/api)

lambq/baidu-translation
=======================

1.0.0(2y ago)00MITPHPPHP &gt;=5.5.9

Since Nov 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/lambq/baidu-translation)[ Packagist](https://packagist.org/packages/lambq/baidu-translation)[ RSS](/packages/lambq-baidu-translation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (1)Used By (0)

百度翻译API封装
=========

[](#百度翻译api封装)

### Usage:

[](#usage)

- 定位到您的项目路径运行

```
composer require Lambq/baidu-translation

```

```
    use Lambq\BaiduTranslation\BaiduTranslation;

    # $app_id = 您的ID;
    # $secrect_key = 您的Key;

    $translation = new BaiduTranslation($app_id,$secrect_key);

    # $query 要查询的内容
    # $from 源语言（见语言列表）
    # $to 目标语言 （见语言列表）

    $res = $translation->translate($query,$from,$to);
```

返回值为json格式

```
成功：
{
    'result':'翻译结果',
    'status': 0
}

失败：
{
    'result':'错误原因',
    'status': 1
}
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

918d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fcf1080ff234e0c4a3c3c06187211ac43ae811c21d66a2d0a3d6b420536cac0?d=identicon)[lambq](/maintainers/lambq)

---

Top Contributors

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

---

Tags

apibaidu

### Embed Badge

![Health badge](/badges/lambq-baidu-translation/health.svg)

```
[![Health](https://phpackages.com/badges/lambq-baidu-translation/health.svg)](https://phpackages.com/packages/lambq-baidu-translation)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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