translations.index
Resource information
URL | |
|---|---|
Method | GET |
Description | Retrieve a paginated list of translations filtered by language and resource |
Authorization required | Yes |
Parameters
Name | Data type | Description |
|---|---|---|
token | xsd:string | REQUIRED. More information concerning authorization in API introduction section |
GET parameters
Name | Data type | Description |
|---|---|---|
lang_code | xsd:string | OPTIONAL. Language code, e.g "zh-CN" - case sensitive |
resource_type | xsd:string | OPTIONAL. Type of the resource Available resource types: |
resource_id | xsd:int | OPTIONAL. Id of the resource |
resource_field | xsd:string | OPTIONAL. Field of the resource, one resource may have multiple translated fields e.g. name - possible values depend on the resource_type |
all | xsd:int | OPTIONAL. When true, will use STATSCORE translations as fallback for missing client translations. Valid values: 0, 1 |
lang_client_id | xsd:int | OPTIONAL. When true, will only STATSCORE translations will be displayed. Valid values: 1 |
page | xsd:int | OPTIONAL. |
limit | xsd:int | OPTIONAL. Valid values: 5, 10, 25, 50, 100, 250, 500 Default: 50 |
Output elements
If fail:
.data |
|
|---|---|
message | Response info message. |
status | Response code. |
If success:
.data |
|
|---|---|
id | Id of the translation entry |
lang_code |
|
value | Translated text |
resource_id |
|
resource_type |
|
resource_field |
|
client_id | Can be used to distinguish between own translations and STATSCORE translations when using all parameter. STATSCORE client_id = 1 |
Method calling examples
|
|
|---|---|
https://api.statscore.com/v2/translations?token={{YOUR_TOKEN}} | Returns the complete set of translations defined specifically for the requesting client. No fallback translations are included. |
https://api.statscore.com/v2/translations?all=1&token={{YOUR_TOKEN}} | Returns the client’s full translation set and automatically supplements any missing keys with STATSCORE default translations, ensuring full coverage. |