目标文件包(基于文件)

Target file bundles or simply Bundles is the feature that allows you to export sets of strings or files in the formats you select, regardless of the original file format. By default, you can choose from the following three formats: XLIFF, Android XML, and iOS Strings. You can add more target file formats by installing respective applications from the Crowdin Store.

You can work with bundles in several ways:

  • Manage bundles manually via the project’s Translations tab.
  • Connect a VCS integration in Target file bundles mode.
  • Manage bundles using OTA Content Delivery.
  • Manage bundles using Crowdin CLI and API.

When you work with bundles, the primary location for managing (creating, editing, and deleting) them is the project’s Translations tab (for File-based projects). Once you’ve created a bundle, you can use it with all the aforementioned tools.

Use Cases

The most common use cases are the following:

  • You can upload a single source file (e.g., Android XML) to your project, translate it, and then, using bundles, export translations for multiple platforms (e.g., Android XML for the Android app, iOS strings for the iOS app, JSON for the web app, etc.).
  • You can have a single spreadsheet (e.g., XLSX or CSV) where you store source strings for all platforms your app is developed for, and each string is labeled with a respective label. Upload this file to your project, translate it, and then create separate bundles for multiple platforms using a combination of source file paths and string labels.
  • 通过组合 Crowdin 设计工具插件(Figma、Sketch、Adobe XD),您可以在没有源文件的情况下本地化您的移动应用程序,将字符串直接发送到 Crowdin 企业版项目,并使用包以首选格式导出翻译。
  • 您可以以 XLIFF 格式导出特定的字符串集以供离线翻译,然后将完成的翻译上传回 Crowdin 企业版。

Managing Bundles in Translations Tab

To work with bundles manually, you can configure and download them in your project’s Translations tab.

Configuring Bundles

To configure a bundle, follow these steps:

  1. Open your project and go to the Translations tab.
  2. Click Target File Bundles to expand the respective section.
  3. Click Add bundle.
  4. 在出现的页面中,为您的包命名。
  5. Specify the source and resulting file paths. If needed, you can add multiple source path patterns using . In the right panel, you can preview the structure of the source and translation files based on the specified paths.
  6. (可选)要忽略某些文件夹或文件,请选择忽略文件或文件夹,指定它们各自的模式,Crowdin 企业版将在生成包期间跳过这些特定文件或文件夹。 If needed, you can add multiple ignore patterns using .
  7. (Optional) You can specify labels in the Filter by labels and Exclude by labels fields to filter strings, including or excluding them in the generated bundle. 了解标签的更多信息。
  8. Select the file format you’d like your strings to be exported in. To add other formats, install the respective applications from our Store.
    Note: You can select only one format at once within a single bundle.
  9. 点击创建

创建包

Downloading Configured Bundles

To download configured bundles, follow these steps:

  1. Open your project and go to the Translations tab.
  2. Click Target File Bundles to expand the respective section.
  3. 点击 Build 到所需的包。
  4. 包构建活动完成后,点击下载

Download Bundle

The system will build and download a ZIP archive with folders for each of the project’s target languages containing the translation files of the selected format.

Note: The download of the configured bundles works independently of the full project build download.

Editing Bundles

To edit configured bundles, follow these steps:

  1. Open your project and go to the Translations tab.
  2. Click Target File Bundles to expand the respective section.
  3. 点击所需包的 并选择 编辑。 或者,只需点击所需的包。
  4. Make the necessary edits and click Save.

Edit bundle

Deleting Bundles

To delete bundles, follow these steps:

  1. Open your project and go to the Translations tab.
  2. Click Target File Bundles to expand the respective section.
  3. 点击所需包的 并选择 删除
  4. Confirm the deletion by clicking Delete in the appeared dialog.

Delete bundle

Bundles in VCS Integrations

In file-based projects, VCS integrations allow you to work with bundles using the Target file bundles mode.

To configure a VCS integration that works in Target file bundles mode, follow these steps:

  1. 选择目标文件包模式并在 VCS 端授权与 Crowdin 企业版的连接后,选择要将翻译发送到的仓库和分支。
  2. Click to start the configuration of the selected branch.
  3. In the Branch Configuration dialog, specify the preferred name for your configuration file or leave it as is and click Continue.
  4. Select the needed bundles from the list or click Create new to create one from scratch.
  5. Once you’ve selected all the needed bundles in the Branch Configuration dialog, click Save.
  6. To complete the VCS integration configuration, click Save in the dialog where you selected your repo and branches.

VCS Target File Bundles Mode

详细了解在线配置 VCS 集成

Bundles in OTA Content Delivery

To add a distribution that exports translations using bundles, follow these steps:

  1. Open your project and go to the Translations tab.
  2. Click Over-The-Air Content Delivery to expand the respective section.
  3. Add new distribution using the Add distribution button.
  4. In the appeared dialog, name your distribution.
  5. 导出选项部分选择目标文件包
  6. Select the needed bundles from the list or click Create new to create one from scratch.
  7. Once you’ve selected all the needed bundles in the Add distribution dialog, click Create.
    OTA Content Delivery Bundles
  8. Copy the distribution hash so you can use it for integration.

详细了解OTA 内容交付

Bundles in CLI/API

You can also export translations using bundles when working with Crowdin CLI and API.

Read more about Bundles in CLI.

详细了解 API 中的包

本文是否有帮助?