datlechin/laravel-google-translate
最新稳定版本:v0.2.0
Composer 安装命令:
composer require datlechin/laravel-google-translate
包简介
Free Google Translate API for Laravel application.
README 文档
README
This package allows you to free translate your Laravel app easily using the Google Translate API.
Installation
You can install the package via composer:
composer require datlechin/laravel-google-translate
Usage
use Datlechin\GoogleTranslate\Facades\GoogleTranslate; // Using facade $result = GoogleTranslate::source('en') ->target('vi') ->translate('Hello world!'); $result->translatedText(); // Chào thế giới! $result->getAlternativeTranslations(); //[ // [ // 0 => 'Chào thế giới!', // 1 => 'Xin chào thế giới!', // 2 => 'Chào cả thế giới!', // ], //] $result->getSourceText(); // Hello world! $result->getSourceLanguage(); // en
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email datlechin@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 34.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-29