Storeden Developers

Translation API

Current version: v1.1 alpha

Get translation element

GET
/translations/translation.json?uid={uid}&type={type}&selector={selector}&locale={locale-iso}
PARAMETERS LIST
uid required (int) Unique id of your resource
selector required (string) Field to get.
Accepted: title, description
locale required (string) Locale-iso of language you want to get.
Available: 'it_IT', 'en_US', 'fr_FR', 'es_ES', 'de_DE'
type required (string) Resource type.
Available: 'product', 'category', 'brand'
						
{
	"found": true,
	"selector": "title",
	"value": "American Title of product",
	"locale": "en_US"
}
						
					

Set translation for a specified element

PUT
/translations/translation.json
PARAMETERS LIST
uid required (int) Unique id of your resource
selector required (string) Field to get.
Accepted: title, description
locale required (string) Locale-iso of language you want to get.
Available: 'it_IT', 'en_US', 'fr_FR', 'es_ES', 'de_DE'
type required (string) Resource type.
Available: 'product', 'category', 'brand'
value required (string) New translation content
Set translation for a specified element Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['uid'] = 654894124;
$payload['selector'] = 'title';
$payload['locale'] = 'en_US';
$payload['type'] = 'product';
$payload['value'] = 'Awesome red t-shirt';

$translation_operation = $storeden->put('/translations/translation.json', $payload);
					
Set translation for a specified element Response

{
    "status": true,
}