{"id":27242258,"url":"https://github.com/nidalchateur/multilang_site","last_synced_at":"2026-04-04T20:32:53.383Z","repository":{"id":246715289,"uuid":"817200631","full_name":"NidalChateur/multilang_site","owner":"NidalChateur","description":"blog with django Internationalisation(i18n), chatbot","archived":false,"fork":false,"pushed_at":"2024-07-02T07:00:22.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-09T14:54:15.770Z","etag":null,"topics":["bootstrap5","crytography","django","django-rest-framework","dynamic","dynamic-search","i18n","javascript","jwt","multilanguage"],"latest_commit_sha":null,"homepage":"https://multilang-site-1-joro.onrender.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NidalChateur.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-19T08:14:33.000Z","updated_at":"2024-07-10T09:35:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"d986c92f-c6c0-4ccd-a701-1365daf1b5e5","html_url":"https://github.com/NidalChateur/multilang_site","commit_stats":null,"previous_names":["nidalchateur/multilang_site"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NidalChateur/multilang_site","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NidalChateur%2Fmultilang_site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NidalChateur%2Fmultilang_site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NidalChateur%2Fmultilang_site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NidalChateur%2Fmultilang_site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NidalChateur","download_url":"https://codeload.github.com/NidalChateur/multilang_site/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NidalChateur%2Fmultilang_site/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bootstrap5","crytography","django","django-rest-framework","dynamic","dynamic-search","i18n","javascript","jwt","multilanguage"],"created_at":"2025-04-10T20:19:04.738Z","updated_at":"2026-04-04T20:32:53.360Z","avatar_url":"https://github.com/NidalChateur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Python](https://raw.githubusercontent.com/NidalChateur/badges/779ce02cc0ce5bdc16ca2fe297b1229d4e5068d3/svg/python.svg)](https://www.python.org/) \n[![Django](https://img.shields.io/badge/django-5.0.6-blue.svg?logo=django)](https://www.djangoproject.com/)\n[![Poetry](https://img.shields.io/badge/poetry-1.8.3-blue.svg?logo=Poetry)](https://python-poetry.org/)\n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Flake8](https://img.shields.io/badge/linting-flake8-yellowgreen.svg?logo=python)](https://github.com/pycqa/flake8)\n[![Docker](https://img.shields.io/badge/dockerhub-images-important.svg?logo=docker)](https://hub.docker.com/r/nidalchateur/multilang_site)\n\n#  \u003ca href=\"https://multilang-site-1-joro.onrender.com\"\u003eBlogs\u003c/a\u003e\n\n### Presentation \n\nBlogs is a multilingual deployed application built with :\n\n- Django internationalization (i18n) for language support.\n- Django Mail and JWT for password reset functionality.\n- Django Admin to manage data.\n- OpenAI chatbot for interactive user engagement.\n- Cryptography to secure authenticated user data.\n- JavaScript and Django REST Framework for dynamic search functionality.\n- Pillow to resize and save blog images efficiently.\n- Bootstrap for the frontend.\n\n### Uses cases\n\n- Logged-in users: You can change the current language (fr-en), create, read, update, and delete (CRUD) posts, and search through them. All of it is possible in the navigation.\n\n- Visitors: You can change the current language (fr-en), read posts and search through the content. All of it is possible in the navigation.\n\n### Run locally the app\n0. Set environnement variables\n\n1. Install decencies\n\n    - `python -m venv env` or `python3 -m venv env`\n\n    - `env/scripts/activate` or `source env/bin/activate`\n\n    - `pip install -m requirements/dev_freeze.txt`\n\n2. Apply migrations\n\n    - `python manage.py migrate`\n\n3. Run\n\n    - `python manage.py runserver`\n\n### Translation Steps Documentation (i18n)\n\n0. Configure settings.py, templates and python files\n\n    - settings.py :\n    ```\n        from django.utils.translation import gettext_lazy as _\n\n        MIDDLEWARE = [\n        \"django.middleware.security.SecurityMiddleware\",\n        \"django.contrib.sessions.middleware.SessionMiddleware\",\n\n        # add this middleware used by i18n\n        \"django.middleware.locale.LocaleMiddleware\",\n        #\n\n        \"django.middleware.common.CommonMiddleware\",\n        \"django.middleware.csrf.CsrfViewMiddleware\",\n        \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n        \"django.contrib.messages.middleware.MessageMiddleware\",\n        \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n        ]\n\n\n        LOCALE_PATHS = [\n            BASE_DIR / \"locale\",\n        ]\n\n\n        LANGUAGES = [\n            (\"fr\", _(\"French\")),\n            (\"en\", _(\"English\")),\n        ]\n\n\n        LANGUAGE_CODE = \"en\"\n\n        TIME_ZONE = \"UTC\"\n\n        USE_I18N = True\n\n        USE_TZ = True\n\n        USE_L10N = True\n    ```\n\n    - templates (html files) :\n    ```\n    {% load i18n %}\n    \u003cp\u003e{% translate 'No post' %}.\u003c/p\u003e\n\n    ``` \n\n    - forms.py and models.py :\n    ```\n        from django.utils.translation import gettext_lazy as _\n\n        title=_(\"Title\") \n\n    ```\n\n    - views.py :\n    ```\n        from django.utils.translation import gettext as _\n\n        title=_(\"Title\") \n\n    ```\n\n1. Create django.po files for manual translation\n\n    `mkdir locale` \n\n    `py .\\manage.py makemessages -l en --ignore=env/*` \n\n    `py .\\manage.py makemessages -l fr --ignore=env/*`\n\n2. Update django.po files (if modifications are made)\n\n    `py .\\manage.py makemessages -a --ignore=env/*`\n\n3. Manually edit the django.po files for translation\n\n    Open and edit the generated django.po files in the locale directory. Translate the message strings under each language's respective section (msgid for original text and msgstr for translations).\n\n3. Compile translations\n\n    `py .\\manage.py compilemessages`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnidalchateur%2Fmultilang_site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnidalchateur%2Fmultilang_site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnidalchateur%2Fmultilang_site/lists"}