Indholdslevering

Distribution er en CDN-boks, der spejler projektets oversatte indhold og er nødvendig til integration med Android, iOS og Web apps.

Distributionsopsætning

Følg disse trin for at opsætte distribution:

  1. Open your project and go to Tools > Content Delivery. Over-The-Air-indholdslevering
  2. Add new distribution using the Add Distribution button.
  3. In the appeared dialog, name your distribution.
  4. Select only the files, translations for which you want to be shown in your application.
  5. Select one of the following export options:
    • Default export – export translations in the original format of the selected files.
    • Target file bundles – export translations in the selected format regardless of the original format of the selected files. Read more about configuring target file bundles for distribution.
  6. Click Create.
    Over-the-Air Content Delivery
  7. Copy the distribution hash so you can use it for integration.
    Over-the-Air Content Delivery
  8. Сreate as many distributions as you need and select different files for each. You’ll need to click Release next to the needed distribution every time you want to send new translations to the app.
    Over-The-Air-indholdslevering
Note: CDN caches all the translations in release for up to 1 hour, and even when new translations are released in Crowdin Enterprise, CDN may return them with a delay.

Til mobil-apps

Brug Crowdins SDK’er for at sende oversat indhold til mobil-apps via indholdslevering:

Til web-apps

Brug Crowdins OTA JavaScript-klient for at sende oversat indhold til web-apps via indholdslevering.

Læs mere om Crowdins OTA JavaScript-klient.

Benyt flg. instruktioner for manuelt at håndtere oversat indholdslevering til web-apps:

Generér URL’en til oversættelsesfilen på flg. måde:

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

{path_to_file} vil være den samme som for den alm. oversættelses-build. Har filerne ikke eksportmønstre med sprogkodevariabler (f.eks. %locale%, %two_letters_code% mv.), føjer systemet automatisk Crowdins sprogkode til begyndelsen af stien.

Listen over benyttede projektsprogkoder kan findes i metainformationen for distributionsindholdet:

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

Var denne artikel nyttig?