定制 awkaw/laravel-translations 二次开发

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

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

awkaw/laravel-translations

最新稳定版本:2.2.0

Composer 安装命令:

composer require awkaw/laravel-translations

包简介

Translate service for Laravel

README 文档

README

Installation

The library can be installed with Composer and is available on packagist under awkaw/laravel-translations:

composer require awkaw/laravel-translations:^2.1

Run the migrations

php artisan migrate

Install Google Chrome browser

docker run -p 9222:9222 --name your_name_for_image --restart always -d awkaw/chrome

Usage

Usage GoogleChromeBrowser


use LaravelTranslations\Services\GoogleTranslateService;
use LaravelTranslations\Services\GoogleTranslate\Providers\GoogleChromeBrowser;

$sourceLocale = 'en';
$targetLocale = 'ru';

$googleChromeAddress = '127.0.0.1:9222'; // enter your address

$sourceText = 'Test translation';

$options = [
    "provider" => GoogleChromeBrowser::class,
    "googleChromeAddress" => $googleChromeAddress,
    "debug" => false,
];

$service = new GoogleTranslateService($sourceLocale, $targetLocale, $options);

$resultText = $service->translate($sourceText);

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-03-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固