Skip to content

yaraku/yarakuzen-api-php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yaraku Translate - Translate API v2

A MIT licensed PHP thin client library for the Yaraku Translate's Translate API v2

Install with composer

composer require yaraku/translate-api

Set up

<?php

use YarakuTranslate\TranslateApiV2\Client

/*
 * Create a new client, which can be used in multiple requests.
 * 
 * The Authorization key can be found in:
 * Yaraku Translate -> Settings -> API -> TranslateAPI V2.
 * 
 * The url will be the API endpoint you are using, for example:
 * https://translate.yaraku.com/api/translate/v2
 */
 
$client = new Client($authkey, $url);

POST Request

/*
 * Call translate with an array of texts you want to translate.
 * Set the text (source) and translation (target) languages.
 */
$result = $client->translate(
    ['This is a test.', 'Add your texts here.'],
    'en',
    'ja'
);

About

A PHP client library for the Yaraku API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages