Returns all the languages of the site.
Admin SDKAdmin.api('site.languages.find', request, function(response) { … });
HTTP POST/api/v10/site.languages.find
{
"fields" : [ "code", "name", … ] // fields to return - string
}
{
"status" : "ok",
"languages" : [ { // languages
"code" : "de", // code (ISO) - string(2)
"name" : "Deutsch (German)", // name - string(1…35)
"region" : "DE", // region (ISO code) - string(2)
"currency" : "EUR", // currency (ISO code) - string(3)
"isActive" : true, // indicates if it is showed on the site - bool
"isDefault" : true // indicates if it is the dafult language - bool
}, … ]
}
Creates a new language for the site
Admin SDKAdmin.api('site.languages.create', request, function(response) { … });
HTTP POST/api/v10/site.languages.create
{
"language" : { // language to create (required)
"code" : "de", // code (ISO) (required) - string(2)
"region" : "DE", // region (ISO code) (required) - string(2)
"currency" : "EUR", // currency (ISO code) - string(3)
"isActive" : true // indicates if it is showed on the site - bool
}
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
code | AlreadyExist | Code '<code> ' already exists |
code | Malformed | '<code> ' is not a valid language code |
currency | Malformed | '<currency> ' is not a valid currency code |
language | LimitReached | Maximum number of languages has been reached |
region | Malformed | '<region> ' is not a valid region code for language '<code> ' |
Updates a language. Any fields left out of the request will remain unchanged.
Admin SDKAdmin.api('site.languages.update', request, function(response) { … });
HTTP POST/api/v10/site.languages.update
{
"code" : "de", // code (ISO) of the language to update (required) - string(2)
"language" : { // language's fields to update (required)
"code" : "en", // new code (ISO) - string(2)
"region" : "UK", // region (ISO code) - string(2)
"currency" : "GBP", // default currency (ISO code) - string(3)
"isActive" : true // indicates if it is showed on the site - bool
}
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
code | Malformed | Language '<code> ' is not a valid language code |
code | NotFound | Language '<code> ' does not exist |
currency | Malformed | '<currency> ' is not a valid currency code |
isActive | InvalidValue | 'isActive' can not be set to false for the default language |
region | Malformed | '<region> ' is not a valid region code for language '<code> ' |
Deletes one or more languages. The first language can not be deleted.
Admin SDKAdmin.api('site.languages.delete', request, function(response) { … });
HTTP POST/api/v10/site.languages.delete
{
"codes" : [ "de", "en", … ] // codes (ISO) of the languages to delete (required) - string(2)
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
codes | Malformed | '<code> ' is not a valid language code |
The following languages are supported:
Code | Name | Region |
---|---|---|
bg | български (Bulgarian) |
|
ca | Català (Catalan) |
|
cs | Čeština (Czech) |
|
da | Dansk (Danish) |
|
de | Deutsch (German) |
|
el | Ελληνικά (Greek) |
|
en | English (English) |
|
es | Español (Spanish) |
|
et | Eesti (Estonian) |
|
fi | Suomi (Finnish) |
|
fr | Français (French) |
|
gl | Galego (Galician) |
|
hr | Hrvatski (Croatian) |
|
hu | Magyar (Hungarian) |
|
is | Íslenska (Icelandic) |
|
it | Italiano (Italian) |
|
lv | Latviešu (Latvian) |
|
mt | Malti (Maltese) |
|
nb | Norsk, bokmål (Norwegian, Bokmål) |
|
nl | Nederlands (Dutch) |
|
pl | Polski (Polish) |
|
pt | Português (Portuguese) |
|
ro | Română (Romanian) |
|
sk | Slovenčina (Slovak) |
|
sl | Slovenski (Slovenian) |
|
sq | Shqipe (Albanian) |
|
sv | Svenska (Swedish) |
|
uk | Україньска (Ukrainian) |
|