Get a single translation
GET https://localise.biz/api/translations/{id}/{locale}
Gets a single translation in currently authenticated project.
Translations implicitly exist as long as the asset and locale are in your project.
Translations marked as complete have the translated
field set to true
.
URI parameters
id
|
Asset ID |
string | required |
locale
|
Locale short code, or language tag |
string | required |
key
|
API key - required if not sent in Authorization header |
string | optional |
Request headers
Authorization
|
API key sent as |
string | required if not in query |
Response
A single JSON-encoded Translation
object, which takes the following form:
{
"id": "", // Unique asset ID for which this is a translation
"status": "", // Status of translation as string compatible with export status parameter
"flagged": false, // Whether translation is flagged as requiring attention
"translated": false, // Whether the translation exists (even if flagged)
"translation": "", // Translated text in specified locale
"revision": 0, // Number of edits made, zero if never translated
"comments": 0, // Number of comments available
"modified": "", // Time last modified in UTC, null if translation doesn't exist
"author": {
"id": 0, // User id
"name": "", // Full user name
"email": "", // Contact email address if you have permission to see it
},
"flagger": {
"id": 0, // User id
"name": "", // Full user name
"email": "", // Contact email address if you have permission to see it
},
"locale": {
"code": "", // Locale short code, or language tag
"name": "", // Friendly display name
"source": false, // Whether the default/source locale of the project
"plurals": {
"length": 2, // Number of forms including singular
"equation": "n != 1", // Equation for calculating offset in forms
"forms": ["zero","one","two","few","many","other"], // Plural form names
},
"progress": {
"translated": 0, // Number of assets for which a translation exists (including those flagged)
"untranslated": 0, // Number of assets that are not yet translated to this language
"flagged": 0, // Number of translations that are flagged as requiring attention
"words": 0, // Approximate word count for translated texts in this language
}
},
"plurals": [
{
"id": "", // Asset ID
"status": "", // Status of translation as string compatible with export status parameter
"flagged": false, // Whether translation is flagged as requiring attention
"translated": false, // Whether asset is translated and contributing to project completion
"translation": "", // Translated text in specified locale
"revision": 0, // Number of edits made, zero if never translated
"comments": 0, // Number of comments available
"modified": "", // Time last modified in UTC, null if translation doesn't exist
"author": {
"id": 0, // User id
"name": "", // Full user name
"email": "", // Contact email address if you have permission to see it
},
"flagger": {
"id": 0, // User id
"name": "", // Full user name
"email": "", // Contact email address if you have permission to see it
}
}
]
}