Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

XLIFF Exchange for django-modeltranslation

https://travis-ci.org/romanvm/django-modeltranslation-xliff.svg?branch=master https://codecov.io/gh/romanvm/django-modeltranslation-xliff/branch/master/graph/badge.svg

XLIFF Exchange is an extension for django-modeltranslation package that allows to export translatable content in OASIS XLIFF 1.2 format supported by most translation tools and import content in target languages from translated XLIFF files.

XLIFF Exchange screenshot

Export action and Import form in Django admin

Introduction

Django has good support for translating UI elements but lacks support for translating dynamic content stored in a database. There are a number of third-party packages for that purpose, including django-modeltranslation that uses registration approach for adding translations to Django model fields. It also provides admin classes that allow to enter translations for model fields directly in Django admin interface. However, with large volumes of content and many translation languages such direct content manipulation can be quite cumbersome. XLIFF Exchange for django-modeltranslation simplifies translation management by providing an admin action for bulk exporting translatable content to XLIFF 1.2 format and a form for uploading translated XLIFF files.

XLIFF 1.2 files are supported bu most (if not all) offline and online translation tools, including SDL Trados, Deja Vu, memoQ, Transifex, SmartCAT and many others. You can simply export your content to XLIFF files, give them to your in-house or external translators to translate, and then import translated contend back to your Django project. Translatable fields in respective languages will be updated automatically.

Compatibility

  • Python: 3.4-3.7

  • Django: 1.11-2.1

  • django-modeltranslation: 0.13-beta1 and above

Note: some Python/Django combinations may not work. You can find compatible combinations in tox.ini file.

Installation

  • Install XLIFF Exchange with pip:

    pip install django-modeltranslation-xliff
  • Add 'modeltranslation_xliff' to INSTALLED_APPS in your project’s settings.py:

    INSTALLED_APPS = (
        'modeltranslation',
        'modeltranslation_xliff',
        ...
    )

Usage

XLIFF Exchange for django-modeltranslation provides XliffExchangeMixin class for modeltranslation.admin.TranslationAdmin that adds XLIFF export/import functionality.

Minimal example:

from django.contrib import admin
from modeltranslation.admin import TranslationAdmin
from modeltranslation_xliff import XliffExchangeMixin
from .models import MyModel


@admin.register(MyModel)
class MyModelAdmin(XliffExchangeMixin, TranslationAdmin):
    pass

XliffExchangeMixin class is compatible with TranslationAdmin and its child classes, e.g. TabbedTranslationAdmin.

Documentation

See XLIFF Exchange documentation for more info.

License

MIT. See LICENSE.txt.

Metadata

Release files for django-modeltranslation-xliff 1.0.0b3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-modeltranslation-xliff 1.0.0b3
File Size Uploaded
django-modeltranslation-xliff-1.0.0b3.tar.gz 19.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-modeltranslation-xliff 1.0.0b3
File Interpreter ABI Platform
django_modeltranslation_xliff-1.0.0b3-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / django-modeltranslation-xliff-1.0.0b3.tar.gz

Download URL django-modeltranslation-xliff-1.0.0b3.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fbae612d85c131b815ed03d1b493db80e12f560efe6363419444e9491db42703
BLAKE2b-256 checksum
How to use checksums
3da3c6f4cea4208a21b568fc8d982efb01368dd9193540f1e03225c96d715db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release files / django_modeltranslation_xliff-1.0.0b3-py3-none-any.whl

Download URL django_modeltranslation_xliff-1.0.0b3-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d8567b15d4a6b4e9728f7b989c9dfd6868f55ce6379b35e58ec5346e12774b3
BLAKE2b-256 checksum
How to use checksums
97c802bde453ee8483068694ce6076e7db2bc3252a77cfcd4eb4b9552c3fe40b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.0.0b3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page