vrakita/contentlocalizedapi
最新稳定版本:v1.2
Composer 安装命令:
composer require vrakita/contentlocalizedapi
包简介
Content Localized PHP Sync API
README 文档
README
Installation:
Add this to your composer.json
{
"require": {
"vrakita/contentlocalizedapi": "1.*"
},
"config": {
"preferred-install": "dist"
}
}
Update your dependencies
composer update
Create .env file with your ContentLocalized credentials
CL_EMAIL=mymail@firstbeatmedia.com
CL_PASSWORD=secretpassword
CL_SSL=1
Example:
<?php
require 'vendor/autoload.php';
use CLAPIClient\Clients\DVIP\CompletedTranslation;
try {
$sync = new CompletedTranslation(__DIR__);
$response = $sync
// Set author of string changes
->setWriter('writer@test.ff')
// Set string which is translating
->setString('new string 2')
// Set translation of string
->setTranslatedString('hello world uk')
// Set language of translation
->setTranslationLanguage('rs')
// Sandbox mode http://dev.contentlocalized.com/
->sandbox()
// Log errors to directory
->log(__DIR__)
// Send request
->send();
} catch (\Exception $e) {
echo $e->getMessage();
exit;
}
var_dump($response);
统计信息
- 总下载量: 16.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-04-27