REST interface for configured project locales.
Returns list of active locales for a single project. This may be the list of locales inherited from the server.
code | condition |
---|---|
200 | Content contains a list of locale details |
404 | The project is not found |
media type | data type | description |
---|---|---|
application/json | array of Locale Details (JSON) | OK 200 containing the list of LocaleDetails NOT FOUND 404 if the project does not exist |
application/vnd.zanata.project.locales+json | array of Locale Details (JSON) | |
application/vnd.zanata.project.locales+xml | list of Locale Details (XML) | |
application/xml | list of Locale Details (XML) |
GET /projects/p/{projectSlug}/locales 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 a single project.
code | condition |
---|---|
200 | Content contains a list of source locale details |
404 | The project is not found |
media type | data type | description |
---|---|---|
application/json | array of SourceLocaleDetails (JSON) | OK 200 containing the list of SourceLocaleDetails NOT FOUND 404 if the project does not exist |
GET /projects/p/{projectSlug}/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
}
} ]