Installation ¶
The preferred way to install this extension is through composer.
Either run
php composer.phar require skeeks/yii2-google-api "*"
or add
"skeeks/yii2-google-api": "*"
Usage ¶
//App config
[
'components' =>
[
//....
'googleApi' =>
[
'class' => '\skeeks\yii2\googleApi\GoogleApiComponent',
'developer_key' => 'YOUR_GOOLE_API_KEY',
],
//....
]
]
$service = new Google_Service_Translate(\Yii::$app->googleApi->client);
$result = $service->languages->listLanguages([
'target' => 'ru'
]);
print_r($result);
$result = $service->translations->listTranslations('apple', 'ru');
print_r($result);
Resources ¶
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com
https://www.yiiframework.com/extension/skeeks/yii2-google-api — actual version
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.