Strings

List all translations

Changed on

Returns translated strings from Smartling. You can get translations by specifying a file you want strings for, or you can specify individual strings by hashcode.

If you do not specify at least one of these parameters (hashcodes or fileUri) no results will be returned.

Note: If you use this call to get strings that were not created via the Strings API, you may see differences in the response.

Only authorized and active strings will be returned. Excluded, unauthorized, and inactive strings will not be returned.

You may see a value for parsedStringText but a null value for stringText. The stringText records the raw input received by the Strings API, and therefore will only appear for strings uploaded via the Strings API. If you are getting a GDN string, the original placeholder values you used will not be returned as these are not saved by Smartling. GDN strings will have placeholders in the format {0}, {1}, etc.

get/strings-api/v2/projects/{projectUid}/translations

Request

  • Base URL
    https://api.smartling.com
  • Auth
    HTTP bearer

Path parameters

projectUidstring required

Unique identifier of a Smartling project — 9 lowercase alphanumeric characters.

Example:84c012a33

A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.

Query parameters

hashcodesHashcode[]

Hashcodes for each string you want to get translations for.

[
  "d41d8cd98f00b204e9800998ecf8427e"
]
targetLocaleIdstring required

Locale identifier. Either a 2-letter language code (en) or a language-region pair (en-US). The language part is always lowercase; the region part is always uppercase.

Example:fr-FR

Smartling ID for the language you want to get translations for.

retrievalType'pending' | 'published'

Sets the types of translations you want returned. published will only return translations that have completed their workflows and been published. pending will return any saved translations.

fileUristring

URI path of a source file within a Smartling project.

Example:/content/en/home.json

URI of a file you want to get translations for.

limitinteger

Pagination setting. By default, responses will be limited to 500 per request. Maximum allowed value is 10,000.

offsetinteger

Number of items to skip. Default is 0.

showPlaceholderValuesboolean

When true (default), placeholder tokens are resolved to display values. When false, internal placeholder format ({0}, {1}, etc.) is preserved.

Response

OK

Example response

{
  "response": {
    "data": {
      "items": [
        {
          "hashcode": "d41d8cd98f00b204e9800998ecf8427e",
          "keys": [
            {
              "fileUri": "/content/en/home.json"
            }
          ],
          "targetLocaleId": "fr-FR",
          "workflowStepUid": "7564fc097a85"
        }
      ]
    }
  }
}

Changes