Skip to main content

An application made for the Django Web Framework.

Project description

locale_selector

A simple language selector pop-up modal for Django/Wagtail.

Has 2 integrated backends for wagtail-localize translate page subtree tasks.

  • locale_selector.jobs.ThreadedBackend
  • locale_selector.tasks.CeleryBackend

Quick start

  1. Add 'locale_selector' to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
   ...,
   'locale_selector',
]
  1. Add the following staticfiles accordingly:
locale_selector/css/locale_selector.css
locale_selector/js/locale_selector.js
  1. Use the templatetag in your base.html:
{% load locale_selector %}
...

{# maintainer        Which maintainer do you want to display      #}
{# maintainer_site   Which maintainer site do you want to display #}
{# current_flag      Show the flag for the current language       #}
{# modal             Show a modal or banner                       #}
{# sticky            Make the modal/banner open/close button sticky in the document #}

{% locale_selector current_flag=True modal=False sticky=True %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

locale_selector-1.0.4.tar.gz (1.2 MB view details)

Uploaded Source

File details

Details for the file locale_selector-1.0.4.tar.gz.

File metadata

  • Download URL: locale_selector-1.0.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for locale_selector-1.0.4.tar.gz
Algorithm Hash digest
SHA256 57b8942073365b74bd3c46376c2d8532066ef18a4a4a5319e7f3f866ab1632b5
MD5 381d8b7758f97cdb538d26af4c2714da
BLAKE2b-256 fc2f587db95598cfa24a215def7a57b357cfd9a79c7884dc3e408745a9735d82

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page