{ "info": { "author": "Jan Mus\u00edlek", "author_email": "jan.musilek@nic.cz", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "==================\ndjango-lang-switch\n==================\n\n.. image:: https://travis-ci.org/stinovlas/django-lang-switch.svg?branch=devel\n :target: https://travis-ci.org/stinovlas/django-lang-switch/branches\n.. image:: https://codecov.io/gh/stinovlas/django-lang-switch/branch/devel/graph/badge.svg\n :target: https://codecov.io/gh/stinovlas/django-lang-switch/branch/devel\n.. image:: https://img.shields.io/pypi/v/django-lang-switch.svg\n :target: https://pypi.org/project/django-lang-switch\n.. image:: https://img.shields.io/pypi/pyversions/django-lang-switch.svg\n :target: https://pypi.org/project/django-lang-switch\n.. image:: https://img.shields.io/pypi/djversions/django-lang-switch.svg\n :target: https://pypi.org/project/django-lang-switch\n\nLanguage switch for Django.\n\n\n--------------\n Installation\n--------------\n\nYou can install ``django-lang-switch`` from PyPi:\n\n.. code-block:: bash\n\n $ pip install django-lang-switch\n\n\n---------------\n Configuration\n---------------\n\nYou need to add ``django_lang_switch.apps.DjangoLangSwitchConfig`` into your ``INSTALLED_APPS`` setting.\nIf you want to add enable language switch in django admin site, you have to add it before ``django.contrib.admin``.\nOtherwise, you need to put ``django.contrib.admin`` first.\nIf you don't use django admin site, the order does not matter.\n\nIf you tweaked the ``admin/base_site.html`` template yourself,\nput this application after yours and use the template tag as described below.\n\nYou also need to include ``django-lang-switch`` urls to your ``ROOT_URLCONF``. Example:\n\n.. code-block:: python\n\n from django.urls import include, path\n\n urlpatterns = [\n ...\n path('django_lang_switch/', include('django_lang_switch.urls')),\n ]\n\nYou can of course change the path to suit your needs.\n\n\n-------\n Usage\n-------\n\nIf you just want to add language switch to django admin site,\nadd this application to your ``INSTALLED_APPS`` as described above and you are done.\n\nIf you want to use the same switch elsewhere, add template tage ``lang_switch_dropdown`` to your template.\nDon't forget to load ``lang_switch`` tag collection to your template. Example:\n\n.. code-block:: html\n\n {% extends myapp/base_site.html %}\n {% load lang_switch %}\n