Skip to main content

yawd-translations, create multilingual django websites

yawd-translations provides a set of tools for creating multilingual websites with django.

The application includes the following tools:

  • Manage the website’s installed Languages through the admin interface

  • Generate translation messages (makemessages and compilemessages) for all installed applications and defined languages using the admin interface (no need to restart the web server).

  • Translatable db models API

  • A custom admin inline to manage db translations

  • A custom middleware to replace django.middleware.locale.LocaleMiddleware and achieve the following:

    • Change the way django detects language preference and use the db default language (set through the admin interface)

    • Redirects to language-dependant URLs are permanent (301) and not temporary (302).

  • A patterns function (that behaves pretty-much like django’s own i18n_patterns() does) to achieve the following:

    • Match root URL paths as default language URLs: If your default language is English (en), i18n_patterns() will not match the / URL as the english homepage and the django middleware would redirect pages to their /en/ equivalent (e.g. your homepage would be http://example.com/en/ and all requests to http://example.com/ would be redirected to http://example.com/en/). The custom patterns function implements the exact opposite, which is a common practice to web development. Therefore http://example.com/ will be matched as the real permalink (instead of http://example.com/en/). For non-default languages, the custom patterns function behaves like i18n_patters() does.

  • A context processor to access available languages in your templates and a simple template tag to easily switch between the available translations of a page in the front-end website.

Usage and demo

See the yawd-translations v0.5.2 documentation for information on how to install the demo and use yawd-translations.

Metadata

Release files for yawd-translations 0.5.2

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

Source distribution (sdist)

Source distribution for yawd-translations 0.5.2
File Size Uploaded
yawd-translations-0.5.2.tar.gz 17.4 kB Details

Release files / yawd-translations-0.5.2.tar.gz

Download URL yawd-translations-0.5.2.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
79dffd372f2b2392953ce921130188e9b19d82c082e3b4a55ccd647b75389633
BLAKE2b-256 checksum
How to use checksums
10c55bea36b69a8ca391501abdc83da2e136b4a0ebc05c2dc3dd1b9a3893cea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.2 This release

1 release file

0.5.1

1 release file

0.5.0

1 release file

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