• Documentation
  • Django SDK
  • Setup Django SDK

Setup Django SDK

Outdated article

All developer documentation has moved to Transifex Developer Hub. Read this article here.

In this article, you will find all the information regarding setting up your Transifex project to leverage the Transifex Native SDK.

To get started with a Transifex Native setup you will need to have:


Transifex Native supports the following versions:

  • Python 2.7, 3.5+
  • Django 1.11+

To install the SDK to your project use this command:

$ pip install transifex-python

You can also find the toolkit in PyPi: Transifex Python toolkit


To be able to authenticate you will need a set of credentials for the specific Transifex project you want to set up Transifex Native on.

Transifex Native SDK communicate with Transifex through the Transifex Content Delivery Service and requires the following credentials:

  • project_secret, related to your Transifex project and used for pushing source content to Transifex
  • project_token, again related to your Transifex project and used for pulling translations from Transifex

Once you have those two credentials you can proceed to configuring your Django project.


Add the following entries in the settings file of your Django project.


LANGUAGE_CODE = 'en-us'  # replace with your project's source language
USE_I18N = True
USE_L10N = True

# Replace with the proper values for the Transifex project token and secret,
# as found in the Transifex UI under your project
TRANSIFEX_TOKEN = <project_token>  # used for pulling translations from Transifex
TRANSIFEX_SECRET = <project_secret>  # used for pushing source content to Transifex

TRANSIFEX_SYNC_INTERVAL = <seconds> # used for defining the daemon running interval in seconds

A list of supported language codes is available here and should be declared in the ll-cc format, compatible with the Accept-Language HTTP header specification, for example pt-br instead of pt_BR.


If you are interested in testing Transifex Native on one of your Transifex projects, please get in touch with us to guide you through the process.