Install TML with pip
pip install django_tml
Configure the SDK:add django_tml to installed_apps and middleware_classes
INSTALLED_APPS = (
'django_tml',
)
MIDDLEWARE_CLASSES = (
'django_tml.middleware.TmlControllerMiddleware',
)
Then add the following TML configuration to setting file:
TML = {
'application': {
'key': 'YOUR_APPLICATION_KEY'
},
'cache': {
'enabled': True,
'adapter': 'memcached',
'backend': 'pylibmc'
}
}
Add the Translation Exchange scripts and mark up your strings
{% load tml tml_inline %}
{% load tml_inline_header %}
// Add a language selector
{% tml_language_selector type="default" %}
// Use "tr" function with your strings
{% trs "Hello World" %}
{% tr with count=5 %} You have {count || message} {% endtr %} //You have 5 messages
Get detailed reports on how your localization and translation are progressing.
Invite your own translators or order professional translations from our network of 15,000+ on-demand translators with just a few clicks.
Access all your digital content from our dashboard and review your latest translations