{"id":17114713,"url":"https://github.com/laura-barluzzi/django-user-language-middleware","last_synced_at":"2026-02-26T09:43:22.476Z","repository":{"id":52266398,"uuid":"128847537","full_name":"laura-barluzzi/django-user-language-middleware","owner":"laura-barluzzi","description":"Django middleware to translate with language in user model","archived":false,"fork":false,"pushed_at":"2021-05-03T12:20:28.000Z","size":17,"stargazers_count":12,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T04:08:53.590Z","etag":null,"topics":["django","django2","localization","middleware","python2","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laura-barluzzi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-09T23:58:13.000Z","updated_at":"2024-10-16T13:56:29.000Z","dependencies_parsed_at":"2022-09-11T01:10:24.060Z","dependency_job_id":null,"html_url":"https://github.com/laura-barluzzi/django-user-language-middleware","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laura-barluzzi%2Fdjango-user-language-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laura-barluzzi%2Fdjango-user-language-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laura-barluzzi%2Fdjango-user-language-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laura-barluzzi%2Fdjango-user-language-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laura-barluzzi","download_url":"https://codeload.github.com/laura-barluzzi/django-user-language-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661704,"owners_count":21141450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django2","localization","middleware","python2","python3"],"created_at":"2024-10-14T17:19:55.343Z","updated_at":"2026-02-26T09:43:17.432Z","avatar_url":"https://github.com/laura-barluzzi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"************************\nUser Language Middleware\n************************\n\n.. image:: https://travis-ci.org/laura-barluzzi/django-user-language-middleware.svg?branch=master\n    :target: https://travis-ci.org/laura-barluzzi/django-user-language-middleware\n.. image:: https://img.shields.io/pypi/v/django-user-language-middleware.svg\n    :target: https://pypi.python.org/pypi/django-user-language-middleware/\n\nWhat's this?\n============\n\nThis package contains a middleware that activates translations based on the\nlanguage field in the user model. This enables easy user-specific localization\nof a Django application: just add a language string field to the user model,\ninstall this middleware and you're good to go!\n\nUsage\n=====\n\nAdd a language field to your user model:\n\n.. code-block:: python\n\n    class User(auth_base.AbstractBaseUser, auth.PermissionsMixin):\n        # ...\n        language = models.CharField(max_length=10,\n                                    choices=settings.LANGUAGES,\n                                    default=settings.LANGUAGE_CODE)\n\nInstall the middleware from pip:\n\n.. code-block:: sh\n\n    pip install django-user-language-middleware\n\nand then add it to your middleware class list to listen to requests:\n\n.. code-block:: python\n\n    MIDDLEWARE = [  # Or MIDDLEWARE_CLASSES on Django \u003c 1.10\n        ...\n        'user_language_middleware.UserLanguageMiddleware',\n        ...\n    ]\n\nSupported versions\n==================\n\nPython:\n\n- 2.7\n- 3.4 to 3.6\n\nDjango:\n\n- 1.8 to 1.11\n- 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaura-barluzzi%2Fdjango-user-language-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaura-barluzzi%2Fdjango-user-language-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaura-barluzzi%2Fdjango-user-language-middleware/lists"}