Socket
Book a DemoInstallSign in
Socket

django_languageselect

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django_languageselect

Simple language select as custom template tag

6.0.0
pipPyPI
Maintainers
1

django_languageselect

PyPI PyPI

Simple language select as custom template tag

Requirements

  • "django.middleware.locale.LocaleMiddleware" in MIDDLEWARE_CLASSES / MIDDLEWARE
  • "django.core.context_processors.request" in TEMPLATE_CONTEXT_PROCESSORS / TEMPLATES['OPTIONS']['context_processors']
  • Add "django_languageselect" to INSTALLED_APPS

Usage

To use django_languageselect in a project, add it to INSTALLED_APP

INSTALLED_APP  = [
    *INSTALLED_APP,
    'django_languageselect',
]

Add this to your urls.py

urlpatterns = [
    *urlpatterns,
    url(r'^languageselect/', include('django_languageselect.urls')),
]

Use the languageselect tag where you which to show languages list:

{% load languageselect %}

{% languageselect %}

Routes

The only url provided by this application is "languageselect_index". Required GET-parameter is "language", optional GET-parameter is "next". Next contains the named url to redirect after the language change. This parameter is pre-filled with the current page url. Customization

Feel free to use your own template, just add languageselect/layer.html

  • Free software: MIT license

Tests

Tests will be automatically run by travis on commit to master.

They can also be executed locally using docker-compose by running docker-compose up

Making a new release

This project makes use of RegioHelden's reusable GitHub workflows.
Make a new release by manually triggering the Open release PR workflow.

Keywords

django

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.