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

Field to get for type 'product'.
Accepted: title, description, tab_0, tab_1, tab_2, tab_3, seo_title, seo_description, seo_keywords
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', 'filter'
*filter is in alpha stage
						
{
	"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 update.
Accepted: title, description

Field to update for type 'product'.
Accepted: title, description, tab_0, tab_1, tab_2, tab_3, seo_title, seo_description, seo_keywords
*filter: for filter translation you must pass: "key" for update the filter name. If you want to update the value, into "selector" you must pass the value base name
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', 'filter'
*filter is in alpha stage
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,
}