内容交付

分发是一个 CDN 保险库,它反映了项目的翻译内容,并且是与 iOS、Android 或 Web 应用程序集成所必需的。

Distribution Setup

To configure a distribution, follow these steps:

  1. 打开您的项目并转到** 工具 > 内容交付**。 Over-the-Air Content Delivery
  2. 使用添加分发按钮添加新的分发。
  3. In the appeared dialog, name your distribution.
  4. 只选择你希望在应用程序中显示的文件和翻译。
  5. Select one of the following export options:
    • 默认导出 – 以所选文件的原始格式导出翻译。
    • 目标文件包 – 无论所选文件的原始格式如何,都以所选格式导出翻译。 详细了解配置目标文件包以进行分发
  6. 点击创建
    Over-the-Air Content Delivery
  7. 复制分发哈希值,以便您可以将其用于集成。
    Over-the-Air Content Delivery
  8. 根据需要创建尽可能多的分发,并为每个分发选择不同的文件。 每次要向应用程序发送新翻译时,您都需要点击所需分发旁边的发布
    Over-the-Air Content Delivery
注意:CDN 会将发布中的所有翻译缓存长达 1 小时,即使在 Crowdin 企业版中发布了新的翻译,CDN 也可能会延迟返回它们。

For Mobile Applications

To send the translated content to your mobile apps via content delivery, use the Crowdin SDKs:

For Web Applications

To send the translated content to your web apps via content delivery, use the Crowdin OTA JavaScript client.

详细了解 Crowdin OTA JavaScript 客户端

To manage the translated content delivery to your web apps manually, use the following instructions:

翻译文件的 URL 应使用以下格式:

https://distributions.crowdin.net/{distribution_hash}/content/{path_to_file}

{path_to_file} will be the same as for the regular translation build. If your files don’t have export patterns with the language code placeholders (e.g., %locale%, %two_letters_code%, etc.), the system will automatically add the Crowdin language code at the beginning of the path.

您可以在分发内容的元信息中找到您的项目语言代码列表:

https://distributions.crowdin.net/{distribution_hash}/manifest.json

Pricing

Pricing Component Free Quota Price
Request Count 1M/month $3.00/1M
Data Transfer 10GB/month $2.00/10GB

A request is considered any single query to a CDN (e.g., a request to a distribution manifest, a request to a distribution file, etc.).

Data transfer is the amount of data transferred over the network (including headers). The system delivers your language packages via CDN, containing all the existing translations.

If the distribution contains content divided into multiple files, a request to download each file is counted as a separate request. Additionally, the volume of files is also counted as a data transfer.

For example, if a distribution contains 20 files, each of which is 5MB, the download is counted as 20 requests and 100MB of data transfer.

To reduce requests to the CDN, you can put all the necessary content into one file (using Bundles), and when it is downloaded, the system counts one request instead of 20 separate ones. Additionally, caching configuration can be made on the app’s side.

In our statistics, we use data provided by AWS. If 1,000,001 (1 million and 1) requests are made in a month, the price for requests will be $6. If 10GB and 1 byte are transferred in a month, the price for data transfer will be $4. The combined total will be $10 per month for requests and data transfer.

本文是否有帮助?