定制 dejurin/php-google-translate-for-free 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dejurin/php-google-translate-for-free

最新稳定版本:1.0.0

Composer 安装命令:

composer require dejurin/php-google-translate-for-free

包简介

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

README 文档

README

Packagist: https://packagist.org/packages/dejurin/php-google-translate-for-free

version downloads StyleCI

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

"Buy Me A Coffee"

Installation

Install this package via Composer.

composer require dejurin/php-google-translate-for-free 

Or edit your project's composer.json to require dejurin/php-google-translate-for-free and then run composer update.

"require": { "dejurin/php-google-translate-for-free": "^1.0" }

Usage

require_once ('vendor/autoload.php'); use \Dejurin\GoogleTranslateForFree;

Single

$source = 'en'; $target = 'ro'; $attempts = 5; $text = 'Hello'; $tr = new GoogleTranslateForFree(); $result = $tr->translate($source, $target, $text, $attempts); var_dump($result); /*   string(24) "Salut" */

Array

$source = 'en'; $target = 'ro'; $attempts = 5; $arr = ['hello','world']; $tr = new GoogleTranslateForFree(); $result = $tr->translate($source, $target, $arr, $attempts); var_dump($result); /*  array(2) {  [0]=>  string(24) "salut"  [1]=>  string(6) "lume"  }  */

License

This source code is distributed under MIT license.

Sponsors

https://currencyrate.today

https://moneyconvert.net/

https://co-w.io/

https://co-in.io/

https://fx-w.io/

统计信息

  • 总下载量: 40.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 136
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 135
  • Watchers: 7
  • Forks: 47
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固