Lucy Xu

Transifex Native CDS: The Modern Way to Handle Content Delivery

transifex-native-cds-blogpost-header

As you’ve probably heard by now, one of the most exciting projects that we’re currently working on is Transifex Native, an end-to-end, cloud-native localization stack. Before Transifex Native, localization teams would need to pull in developers to deploy code that was solely for localization purposes, which created extra work for developers and bottlenecks for localization teams.

As our engineering team continues to refine and build out Transifex Native to be the most useful tool for our global customers, we are taking into account the challenges that those customers are experiencing. Specifically, we’ve found that one big challenge that developers and localization teams encounter is figuring out how to best store all of their phrases for easy accessibility and use on current and future translation projects. That’s where Transifex Native CDS comes in.

What is the Transifex Native CDS?

Transifex Native CDS is a standalone service that stores and serves phrases through two main methods: 1) Transifex Native SDK calls, and 2) API calls to the Transifex application. It works similarly to a Content Delivery Network (CDN) and serves all translations from a created cache, so retrieval of phrases is easy and fast.  

What are the benefits?

There’s a range of use cases for Transifex Native CDS, which all stem from a need for making sure your translations are accessible even in the instances where new translations cannot be fetched from your TMS of choice, in our case the Transifex platform. Transifex Native CDS can be used to:

  • Manage the sending of data (i.e., phrase additions and updates) from your application to Transifex and/ or a service for translation.
  • Feed your application with requested translations.
  • Make sure your application has the most up-to-date available translations.

The CDS is available in both a cloud-based instance (which can be used instantly), as well as via direct install on your own infrastructure to host and store translations on your servers.  

How It Works

Here’s a step-by-step breakdown of how the CDS goes to work for you.

1. The SDK plugin detects and sends phrases requiring translation to the CDS server.

The schema of the Transifex CDS server:

transifex-native-SDK-CDS-application-process_CDS-server-schema_diagram

2. The CDS server parses the ICU syntax found in each phrase and changes the respective phrase to be able to exchange it with an external service as needed.

Sending phrases from your application to Transifex:

transifex-native-SDK-CDS-application-process_sending-phrases-from-app-to-Transifex_diagram

3. The phrases are assigned an identifier based on their source content and stored in a local CDS cache.

4. The CDS server is sending the processed phrases to the external TMS service using API calls to that service (which, in this case, is the Transifex TMS).

5. Translations are fed back to the application, spurred by an automatic request sent from your application’s Transifex SDK.

Feeding your applications with the requested translations:

transifex-native-SDK-CDS-application_finding-applications-with-requested-translations_diagram

6. The CDS server processes the request and returns the requested translations back to your application, as a response in JSON format. If the translations found in the CDS cache are older than a certain threshold (Time to live [TTL] is 90 minutes), after the server responds with the cached translations, it requests any updated translations from the external service, in our case Transifex TMS application.

Note: You can also force request the latest translations by making an HTTP request to a specific endpoint on CDS. In that case, the CDS server will instantly request the latest translations from the external localization service.

Ensuring Security

The Transifex SDK authenticates with the CDS service through a public token, which is bound to a specific projectresource pair on Transifex and allows the serving of content for this particular pair. This then supports a private secret that can be used for pushing content or, in general, performing other operations that might cause alterations. All API endpoints are authenticated using a Bearer token, provided through an Authorization header.

The CDS service authenticates with Transifex API using the same token and secret through an Authorization header. All requests to the Transifex API endpoints use the same authentication method. The token and secret are generated by Transifex and — in addition to being bound to a certain project and resource — are also bound to the specific Transifex user who created the Transifex Native project.

The Way Forward

The Transifex Native CDS is in beta and our team is thoroughly testing its performance. It is currently hosted on a data center based in Ireland and our plan is to expand to data centers throughout the world. In the works are plans to enable hosting of the CDS service on your servers so that you have full control over the infrastructure and data access.

Learn more about Transifex Native and CDS.

Want to learn more about Transifex?

Give Transifex a try with our free 15 day trial, or connect with one of our team members for a personal demo.