Django localization

Django localization for database content and APIs

Use Altified with Django to translate model fields, backend content, and API responses while keeping your database and application workflow intact.

Django data flow
Django model
Altified translation
Localized API

Your backend remains responsible for records and permissions while Altified manages translated values and reuse.

/ The short answer

The Django SDK gives backend code a translation-aware way to resolve fields for the active language. Your API and frontend can then serve localized data from the same product system.

/ 01

Install the package

Run pip install django-altified, add it to INSTALLED_APPS, and connect your Altified project key.

/ 02

Register fields

Run python manage.py init_altified and list the model fields to translate in altified.py.

/ 03

Use Django locale handling

LocaleMiddleware sets the active language, and registered fields return translated values for it.

/ 04

Serve the response

Read fields normally in views and serializers. The original value is the fallback when no translation exists.

/ Why it matters

A localization workflow that belongs inside your product.

Model-aware content

Translate product names, descriptions, listings, lessons, posts, and other backend-owned fields.

API responses

Keep localization close to the data source so frontend clients receive the language they request.

Works with a frontend SDK

Pair Django content localization with Next.js or another frontend that serves locale routes.

Server-side credentials

Keep project secrets on the server while your application controls what content is exposed.

/ Frequently asked questions

Questions teams ask before localizing.

Which Django content can I localize?

You can localize model fields, editorial records, product data, and API-backed values while retaining the original database record as the source-language fallback.

Does localization require moving my data?

No. Your Django application remains the source of truth for records, permissions, and API behavior. Altified manages translated values alongside that workflow.

Can Django power a localized Next.js frontend?

Yes. Django can resolve or expose localized backend content while a frontend SDK handles locale routes, page rendering, and metadata.

How do I localize Django model fields?

Register the model and its text fields in altified.py, for example Product with name and description. When a registered model is saved, the SDK syncs those fields. When code reads product.name and Django's active language is not the source language, the translated value is returned.

How is this different from Django's built-in gettext localization?

Django's gettext workflow translates strings in templates and Python code through .po files compiled at deploy time. It does not cover content stored in your database. Altified handles database and API content that changes after deployment, and works alongside gettext for static strings.

How is this different from django-modeltranslation?

django-modeltranslation adds a database column per field and language, so each new language needs a migration. With Altified you register fields in altified.py and your schema stays unchanged. Translations are managed in the Altified dashboard with glossaries and review.

Can I request a specific language outside the current request?

Yes. Use translate_field(product, "name", language="fr") from django_altified to resolve a field in a given language, for example in emails, background jobs, or exports.