Skip to main content

ponyglot

PyPI Coverage Django versions

Ponyglot core: one translation layer for your Django stack. This package holds the API client, the sync, the review admin and the django-parler and django-modeltranslation adapters. The django CMS and Wagtail connectors (djangocms-ponyglot, wagtail-ponyglot) build on it.

Early access, alpha. APIs may change. See https://ponyglot.app. Requires Django 5.2 or newer and Python 3.10 or newer.

Ponyglot keeps your content's translations consistent (one glossary and translation memory), current (only what changed is retranslated) and reviewed: nothing is published automatically. Model translations arrive as suggestions that an editor applies in the admin.

Install

pip install "ponyglot[parler]"            # or ponyglot[modeltranslation]
INSTALLED_APPS += [
    "ponyglot",
    "ponyglot.contrib.parler",  # or "ponyglot.contrib.modeltranslation"
]
PONYGLOT = {
    "API_KEY": env("PONYGLOT_API_KEY"),  # create one for this site in the dashboard
    "SOURCE_LANGUAGE": "en",  # default: LANGUAGE_CODE
}
python manage.py migrate
python manage.py ponyglot check           # settings and connection
python manage.py ponyglot backfill        # first push of all existing content

Every model registered with django-parler or django-modeltranslation is synced: its text fields (not slugs, URLs, emails or fields with choices). Existing translations are imported on the first push, so nothing is translated twice.

Keep in sync

Saving content only marks it as changed; the HTTP work happens in ponyglot sync. Run it periodically, e.g. every few minutes from cron, or as a worker process:

python manage.py ponyglot sync            # push changes, report reviews, fetch translations
python manage.py ponyglot sync --loop 60  # the same, every 60 seconds (worker process)

Deleting an object deletes its unit in Ponyglot with the next sync. Units whose object disappeared otherwise (a restored or reseeded database, a second database pushing to the same site) stay in Ponyglot and show up in overviews without a link. ponyglot prune lists them, --yes deletes them:

python manage.py ponyglot prune         # units in Ponyglot whose object doesn't exist here
python manage.py ponyglot prune --yes   # delete them in Ponyglot

Units of adapters that aren't installed are left alone, and so are all units of an adapter if none of its objects exist here (likely the wrong database); --adapter <name> includes them.

Translate and review

python manage.py ponyglot translate --estimate   # what it would cost
python manage.py ponyglot translate --wait       # translate everything missing or stale
python manage.py ponyglot sync                   # fetch the translations
python manage.py ponyglot status                 # per language: ✓ / stale / review / missing

Translations appear in the admin under Ponyglot › Translation suggestions with the source text, the current translation and a diff. Edit if needed, then Apply or Reject (also as bulk actions). A suggestion whose source changed in the meantime can't be applied; it is translated again. The next sync reports your decisions, and approved texts (including your corrections) feed the translation memory.

Publish right away

When an editor requests a translation of one object (its dialog) or of selected documents (the dashboard), they can tick Publish the translation right away. It's offered to editors who may publish the content (models: change permission and ponyglot.change_suggestion); PUBLISH_BY_DEFAULT = True pre-ticks it. When the translation arrives, the sync applies it in the editor's name, unless a QA check found an error, the editor lost the permission, or (CMS drafts) the draft has other changes; then it waits for review as usual and the sync report says why. Such translations are reported as published without review: the translation memory only learns them once someone confirms them in Ponyglot. Not offered for a model's or the site's "translate everything".

In the admin: translation dialogs and dashboard

Add PonyglotAdminMixin to the admins of translated models (before the library's admin class; works with parler's TranslatableAdmin and modeltranslation's TranslationAdmin or TabbedTranslationAdmin):

from ponyglot.translations_admin import PonyglotAdminMixin

@admin.register(Product)
class ProductAdmin(PonyglotAdminMixin, TabbedTranslationAdmin):
    ...
  • Change page › Ponyglot translations: this object per language: texts missing or outdated (Translate), translations waiting (Apply, or Review them one by one), texts held by a quality check (a link to the Ponyglot dashboard, the only place where they are resolved). If nothing was fetched in 15 minutes, opening it fetches this object's translations first.
  • Change list › Ponyglot translations: the same for all objects of the model.
  • Ponyglot › Translation dashboard (permission Can use the translation dashboard): the whole site per language, the last sync rounds, every content type with what waits; it can translate everything missing and run a sync now. Which documents need attention lists every document with a gap, per language, to open or to translate and apply in bulk.

Applying needs the permission to change suggestions. Dialogs keep django CMS' modal mode (_popup=1).

Keep content out of translation

In the admin, Ponyglot › Sync states lists everything that is synced. The action Exclude from translation removes objects from Ponyglot (the next sync deletes them there); Translate again undoes it. To exclude only some languages, edit the exclusion under Exclusions from translation. Connectors such as djangocms-ponyglot offer the same from their toolbar (ponyglot.exclusions.exclude / include). Whole models and fields: EXCLUDE_MODELS, EXCLUDE_FIELDS.

QA errors

Every translation goes through Ponyglot's quality checks (links, placeholders, HTML, length, glossary). Your plan and site settings decide who fixes errors:

  • Editors fix them (default on most plans): the suggestion arrives with the error shown. Fix the text and apply, or tick Apply despite QA errors. Bulk apply skips suggestions with errors. The cloud checks applied text again.
  • Separate QA review: translations with errors wait in the Ponyglot dashboard until a reviewer resolves them. Ponyglot › Translations waiting for QA review lists them with the reason (refreshed by every sync), and the suggestion list says how many are waiting.

Emails to editors

With NOTIFY_EDITORS, every sync that brings new suggestions sends one email ("3 translations ready for review", per language, with QA errors counted) through your site's email setup: True for everyone who may change suggestions, or a list of addresses. Set SITE_URL for an absolute link to the admin.

Settings

Key Default
API_KEY – required
API_URL https://api.ponyglot.app/v1
SOURCE_LANGUAGE LANGUAGE_CODE
LANGUAGES codes in LANGUAGES languages the site can store
EXCLUDE_MODELS [] e.g. ["shop.InternalNote"]
EXCLUDE_FIELDS [] e.g. ["blog.Post.subtitle"]
FIELD_FORMATS detected e.g. {"blog.Post.lead": "html"}
SLUG_SOURCES first title field the field a translated slug follows, e.g. {"blog.Post.slug": "headline"}
NOTIFY_EDITORS False True or a list of addresses, see Emails to editors
SITE_URL – e.g. https://example.com, for links in emails
TIMEOUT 30 seconds per request
BATCH_SIZE 50 units per push (≤ 100)
PUBLISH_BY_DEFAULT False pre-tick Publish the translation right away, see above

Translated slugs

Slugs aren't sent for translation. Applying a translated title also sets the target-language slug (slugify, unique per language, within max_length):

  • an empty slug is filled,
  • a slug that was derived from the old title follows the new one,
  • a slug written by hand stays.

Your views must find objects by the slug of the active language, e.g. with django-parler's TranslatableSlugMixin (it also redirects fallback-language URLs) under i18n_patterns, and link other languages with {% get_translated_url %}. When a slug follows a changed title, the object's old URL in that language stops working unless you add a redirect. To keep a model's slugs out of this, list them in EXCLUDE_FIELDS.

gettext catalogs

ponyglot po sync translates .po files through Ponyglot, without Django settings:

$ pip install "ponyglot[gettext]"
$ export PONYGLOT_API_KEY=pg_…   # a site with the gettext adapter
$ python manage.py makemessages -l de -l fr
$ ponyglot po sync locale        # --fuzzy, --no-translate, --yes, --domain, --no-mo

Each run pushes every catalog (one unit per domain and locale directory; existing translations are imported), requests translation of what's missing or stale, waits for the job and writes the results into the .po and .mo files. Run it on a checkout of your default branch and commit the result to a review branch: merging is the approval. The next run finds the translations in the catalogs and reports them approved (changed wording as corrections). With --fuzzy, new translations are flagged fuzzy and count as approved once the flag is gone.

For connector authors

Adapters subclass ponyglot.adapters.Adapter (see ModelAdapter and djangocms-ponyglot), set capabilities and, for draft-based systems, applied_status = "drafted". ponyglot.testing has FakeCloud, an in-memory API for tests: Client(transport=FakeCloud()).

Development

make install   # uv sync
make check     # ruff, migrations check, tests (SQLite, no services needed)
make matrix    # tests on Django 5.2, 6.0 and 6.1 across Python 3.10–3.15

Design decisions: docs/decisions. License: BSD-3-Clause. Contact: hello@ponyglot.app

Metadata

Release files for ponyglot 0.1.0

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

Source distribution (sdist)

Source distribution for ponyglot 0.1.0
File Size Uploaded Provenance Actions
ponyglot-0.1.0.tar.gz 68.6 kB With provenance Details for ponyglot-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ponyglot 0.1.0
File Interpreter ABI Platform Actions
ponyglot-0.1.0-py3-none-any.whl Python 3 none any Details for ponyglot-0.1.0-py3-none-any.whl

Total release size: 155.8 kB

Release files / ponyglot-0.1.0.tar.gz

Download URL ponyglot-0.1.0.tar.gz
Size 68.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c644ccd4e18cd09c7a8dd0cb939ac01b04969ac89cf8d4e131199275ae89eb6e
BLAKE2b-256 checksum
How to use checksums
323b9da9b0e50920099b493ec9bfa97848a05bc3b0f92b55d964d02be83fb73e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / ponyglot-0.1.0-py3-none-any.whl

Download URL ponyglot-0.1.0-py3-none-any.whl
Size 87.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbcc8530fe3a2c86820f19cdbb4d4d75b03a07a731cf29f6d62437aadef1c52b
BLAKE2b-256 checksum
How to use checksums
8cee1e9e1e70ac7495fe287190e9ec75c4f7d91c6d70eaba7b5b5ea79ff12cd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for ponyglot 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ponyglot-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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