Retrieves a full list of locales enabled in Zanata.
name | type | description | default | constraints |
---|---|---|---|---|
filter | query | |||
page | query | 1 | int | |
sizePerPage | query | 10 | int | |
sort | query |
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type | description |
---|---|---|
application/json | object (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response containing a full list of locales. |
GET /locales Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
...
Create a new language in Zanata
media type | data type |
---|---|
application/json | Locale Details (JSON) |
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type | description |
---|---|---|
application/json | Locale Details (JSON) | The following response status codes will be returned from this
operation: OK(201) - Locale is added. OK(200) - Locale is already exist. |
PUT /locales/locale
Content-Type: application/json
Accept: application/json
{
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "Español",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "Español",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
}
Retrieves a list of locales that is not added yet in the server.
name | type | description | default | constraints |
---|---|---|---|---|
filter | query | |||
size | query | 10 | int |
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type | description |
---|---|---|
application/json | array of Locale Details (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response containing a list of locales. |
GET /locales/new Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "Español",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
} ]
Returns list of active source locales of all documents for all active projects. Restricted to admin
code | condition |
---|---|
200 | Content contains a list of source locale details |
500 | If there is an unexpected error in the server while performing this operation |
media type | data type | description |
---|---|---|
application/json | array of SourceLocaleDetails (JSON) | OK 200 containing the list of SourceLocaleDetails |
GET /locales/source Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"docCount" : 12345,
"localeDetails" : {
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "Español",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
}
} ]
Retrieves a full list of localized locales for server.
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type | description |
---|---|---|
application/json | array of Locale Details (JSON) | The following response status codes will be returned from this
operation: OK(200) - Response containing a full list of locales. |
GET /locales/ui Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "Español",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
} ]
Delete a locale in Zanata
name | type | description |
---|---|---|
localeId | path |
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type | description |
---|---|---|
application/json | object (JSON) | The following response status codes will be returned from this
operation: OK(200) - Locale is deleted. |
DELETE /locales/locale/{localeId} Accept: application/json
HTTP/1.1 204 No Content
Content-Type: application/json
...
Retrieve locale details
name | type | description |
---|---|---|
localeId | path |
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type |
---|---|
application/json | Locale Details (JSON) |
GET /locales/locale/{localeId} Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"localeId" : "es-ES",
"displayName" : "Spanish (Spain)",
"alias" : "es",
"nativeName" : "Español",
"enabled" : true,
"enabledByDefault" : true,
"pluralForms" : "nplurals=2; plural=(n != 1)",
"rtl" : true
}
Retrieve locale member list
name | type | description |
---|---|---|
localeId | path |
code | condition |
---|---|
500 | If there is an unexpected error in the server while performing this operation |
media type | data type |
---|---|
application/json | array of LocaleMember (JSON) |
GET /locales/locale/{localeId}/members Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"username" : "...",
"isCoordinator" : true,
"isReviewer" : true,
"isTranslator" : true
} ]