On this page
CDN
Locize publishes your translations as files on a CDN, and your app loads them while it runs. A change you publish reaches your users without a new deploy of your app.
Your app loads public translations from the CDN alone, never from the editor, its API or its database. So they keep loading when the editor is down.
Publishing
A version publishes one file per language and namespace:
https://api.lite.locize.app/<project-id>/<version>/<language>/<namespace>On the Pro CDN the address starts with https://api.locize.app.
With Auto publish, every saved change of a version goes to the CDN. A new project's version latest has it on; a version you add later publishes only when you publish it, and a workspace takes the setting of the version it comes from. You switch it per version: Settings › Integration, card Versions, the version's ⋮ › edit › Auto publish. Without it, publish with publish in the same card, with locize publish-version or through the API.
Standard and Pro
A project uses one of two CDNs. A new project starts on the Standard CDN.
| Standard CDN | Pro CDN | |
|---|---|---|
| Address | api.lite.locize.app | api.locize.app |
cdnType in your tools | standard | pro |
| Cache time | fixed, 1 hour | per version, see Caching |
| Private versions | no | yes |
| History of published files | no | yes, see earlier published files |
| Runs on | Bunny | Amazon CloudFront |
Which CDN your plan includes, and how many downloads: pricing.
Private versions
On the Pro CDN a version can publish privately: its files can only be downloaded with an API key or a personal access token, through the API. Turn on Private publish in the version's edit dialog. This removes the public files at once; the private files follow right away only with Auto publish, otherwise with the next publish.
Private downloads are billed apart from the regular ones, at a higher price: pricing. An app that loads a private version on every visit can download a lot.
Switching the CDN type
During the trial, before the project has a plan, you switch it in the project's Settings › Integration.
With a plan, the CDN is part of it: you switch it in the project's add-ons on your organization. On a plan without Pro CDN downloads, the project cannot switch to the Pro CDN.
A workspace and a tenant always use the CDN type of their parent project.
What happens
- The versions with Auto publish are published to the new CDN at once. A version without it reaches the new CDN only when you publish it.
- The old CDN keeps the files it has, and gets no new ones.
- Your app still loads from the old address until you change it: set
cdnTypein your tools (locize-cli,i18next-locize-backend) or the address you load from.
So you can switch without a gap: switch, publish the versions without Auto publish, check that the new address serves your files, then deploy your app with the new cdnType.
From Pro to Standard
The Standard CDN has no private versions. While a version of the project, of one of its workspaces or of one of its tenants publishes privately, the switch is refused, and the dialog lists those versions. Make them public first, or stay on the Pro CDN.