Main menu

Get all translations of an asset

GET https://localise.biz/api/translations/{id}.json 

Gets all translations of an asset across the currently authenticated project's locales.

Locales not yet translated are included, but their translated field will be set to false.

URI parameters

id

Asset ID

string required
key

API key - required if not sent in Authorization header

string optional

Request headers

Authorization

API key sent as "Loco <key>" or "Basic <encoded>". See Authentication.

string required if not in query

Response

Array of JSON-encoded Translation objects, taking 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
            }
        }
    ]
} ] 

Try it

Open in test console »


« /api/translations