Translations

Add Bundle

Required scopes: project.source.file (Read and Write).

post/projects/{projectId}/bundles

Request

Path parameters

projectIdinteger required

Project Identifier. Get via List Projects

Request body

namestring required

Defines name

formatstring

Defines export file format. If not provided, files will be exported in their original format.

Note: Required for strings-based projects

sourcePatternsstring[] required

Source patterns

ignorePatternsstring[]

Ignore patterns

exportPatternstring nullable

Bundle export pattern. Defines bundle name in resulting translations bundle. Required if format is specified. If format is not specified, uses default pattern based on file structure

Note: Can't contain : * ? " < > | symbols

isMultilingualboolean

Export translations in multilingual file

includeProjectSourceLanguageboolean

Add project source language to bundle

sourceLanguageExportPatternstring

Source language export pattern. Works only when includeProjectSourceLanguage is enabled.

Note: Can't contain : * ? " < > | symbols

includeInContextPseudoLanguageboolean

Add In-Context pseudo-language to bundle

labelIdsinteger[]

Label Identifiers. Get via List Labels

Note: Can't be used when format is null

excludeLabelIdsinteger[]

Label Identifiers. Get via List Labels

Note: Can't be used when format is null

labelMatchRule'all' | 'any' nullable

Match rule for labels:

  • "all" - all labels must be present in string
  • "any" - any of the labels must be present in string

Note: Can only be used when labelIds parameter is provided

excludeLabelMatchRule'all' | 'any' nullable

Match rule for excluded labels:

  • "all" - all labels must be present in string
  • "any" - any of the labels must be present in string

Note: Can only be used when excludeLabelIds parameter is provided

languageIdsstring[] nullable

Language Identifiers. Get via List Supported Languages. If provided, bundle will only export specified languages. If not provided, bundle will export all project target languages.

Example request

{
  "name": "Resx bundle",
  "format": "crowdin-resx",
  "sourcePatterns": [
    "/master"
  ],
  "ignorePatterns": [
    "/masterBranch"
  ],
  "exportPattern": "strings-%two_letter_code%.resx",
  "sourceLanguageExportPattern": "strings-%two_letter_code%.resx",
  "labelIds": [
    13,
    27
  ],
  "excludeLabelIds": [
    5,
    8
  ],
  "languageIds": [
    "uk",
    "de",
    "fr"
  ]
}

Response

Bundle was successfully created

Example response

{
  "data": {
    "id": 1,
    "name": "Resx bundle",
    "format": "crowdin-resx",
    "sourcePatterns": [
      "/master"
    ],
    "ignorePatterns": [
      "/masterBranch"
    ],
    "exportPattern": "strings-%two_letters_code%.resx",
    "sourceLanguageExportPattern": "strings-%two_letters_code%.resx",
    "labelMatchRule": "all",
    "excludeLabelMatchRule": "any",
    "labelIds": [
      13,
      27
    ],
    "excludeLabelIds": [
      5,
      8
    ],
    "languageIds": [
      "uk",
      "de",
      "fr"
    ],
    "webUrl": "https://crowdin.com/project/test/translations#bundles:100",
    "createdAt": "2019-09-20T11:11:05+00:00",
    "updatedAt": "2019-09-20T12:22:20+00:00"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.