Transifex Content Delivery Service
The Transifex Native SDK retrieves translated content via an intermediate service, called the Content Delivery Service (CDS). It works similarly to a CDN and serves all translations from a cache, so that the retrieval is fast.
We offer a cloud-based CDS instance at Transifex that you can optionally host yourself (CDS repository), so that translations are served directly from your servers. In order to do that, you need to provide its host in the settings file of your project.
Below is an example for a Django project:
TRANSIFEX_CDS_HOST = 'https://cds.example.com'
The Content Delivery Service (CDS), makes sure that your translations are decoupled from Transifex servers and can be used even if your application is not directly connected with Transifex.
The CDS is responsible for:
- Management of the content you want to push to Transifex through Transifex Native SDK, regardless of the framework you are using.
- Fetching, storing and updating the latest translations from Transifex so that they are available to your applications
Transifex hosted CDS service
The Transifex hosted CDS is installed on AWS servers. There is an auto-update mechanism in place, when new translations or source string edits are happening within Transifex editor.
Developers can also manually invalidate CDS using the CLI tool of the various Native SDKs, for example:
Self-hosted CDS service
CDS can be self-hosted and configured to work with the following storage backends:
- AWS S3 / Cloudfront
- Google Cloud Storage
- Azure Storage & Azure CDN
- Redis
The public CDS Github repository contains instructions on how to setup the integration with those backends.
Related resources:
Auto-Syncing
By default, content cached in the CDS is considered stale after 1 hour. After this time, it will automatically re-fetch and re-cache the content with fresh data.
If you need more frequent updates, you can adjust the TX__SETTINGS__AUTOSYNC_MIN
setting to a lower value or disable auto-syncing entirely by setting the value to 0.
Updated 6 months ago