LocaleHub logoLocaleHub

Docs

Integration API

GET

https://integration.locale-hub.com/v1/projects/{projectId}/deployments/{deployTag}/cultures

Returns all the published cultures for the given project.

Parameters

Path

deployTag*pathDeployment tag of your current app version
projectId*pathProject id. Can be found on the portal web url when selecting a project

Responses

200: OK

List of supported cultures.
{
  "cultures": [
    "fr-FR",
    "en-GB"
  ]
}

401: Unauthorized

Unauthorized.
{
  "error": {
    "code": "user_access_unauthorized",
    "message": "Unauthorized",
    "statusCode": 401
  }
}
GET

https://integration.locale-hub.com/v1/projects/{projectId}/deployments/{deployTag}/manifests

Returns all the translation for the desired cultures. If a translation is missing in the desired culture, the project default culture value will be used instead.

Parameters

Headers

LH-API-Key*headerApp Key. Can be found on the portal web in the `Apps` section of a project

Query

cultures*queryComma-separated desired cultures for the manifest. The project default culture is implicitly added to the list as an ultimate fallback

Path

deployTag*pathDeployment tag of your current app version
projectId*pathProject id. Can be found on the portal web url when selecting a project

Responses

200: OK

Manifest content. Contains all the translation keys with associated values.
{
  "strings": {
    "app_name": {
      "culture": "en-US",
      "tokens": [
        {
          "type": "text",
          "literal": "MyAwesomeApp"
        }
      ]
    },
    "auth.login": {
      "culture": "en-US",
      "tokens": [
        {
          "type": "text",
          "literal": "Login"
        }
      ]
    },
    "auth.logout": {
      "culture": "en-US",
      "tokens": [
        {
          "type": "text",
          "literal": "Logout"
        }
      ]
    }
  }
}

304: Not Modified

Last served manifest is up to date.

401: Unauthorized

Unauthorized.
{
  "error": {
    "code": "user_access_unauthorized",
    "message": "Unauthorized",
    "statusCode": 401
  }
}