Simple language select as custom template tag
Project description
django_languageselect
Simple language select as custom template tag
Requirements
"django.middleware.locale.LocaleMiddleware"inMIDDLEWARE_CLASSES/MIDDLEWARE"django.core.context_processors.request"inTEMPLATE_CONTEXT_PROCESSORS/TEMPLATES['OPTIONS']['context_processors']- Add
"django_languageselect"toINSTALLED_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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_languageselect-7.0.0.tar.gz.
File metadata
- Download URL: django_languageselect-7.0.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6acd26575740d32f974547a27d0daf9bec3b0c6bfee77d49d93196af76ceba2
|
|
| MD5 |
f33d4f6c6325eb9438b76710ff4d677c
|
|
| BLAKE2b-256 |
12c3242053f1ba4a03ee4803e53bcf421b44b1221cb4cf776f83021b2bfb356d
|
File details
Details for the file django_languageselect-7.0.0-py3-none-any.whl.
File metadata
- Download URL: django_languageselect-7.0.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1f16dd5bd3db5bde88d8f1025094f35bf640486e06518964f8254fcf130079d
|
|
| MD5 |
dc644b827f82173c8f10c1c774b696bb
|
|
| BLAKE2b-256 |
bea1a61055b40ac678306316711812b921c5ae1a24a4418192f4ccae3b9c54dc
|