{"repo":"Aristotle-Metadata-Enterprises/django-garnett","free":true,"listed":false,"github":"https://github.com/Aristotle-Metadata-Enterprises/django-garnett","clone":"git clone https://github.com/Aristotle-Metadata-Enterprises/django-garnett.git","description":"Django Garnett is a field level translation library that allows you to store strings in multiple languages for fields in Django - with minimal changes to your models and without having to rewrite your code.","language":"Python","stars":81,"topics":["hacktoberfest","django","translation","i18n"],"license":"BSD-3-Clause","category":"api-integrations-sdks","readme_excerpt":"django-garnett Django Garnett is a field level translation library that allows you to store strings in multiple languages for fields in Django - with minimal changes to your models and without having to rewrite your code. Want a demo? https://django-garnett.herokuapp.com/ Made with ♥ by Aristotle Metadata In summary it allows you to do this: models.py You can do this! By changing your models from this... to this... Tested on: - Django 3.1+ - Postgres, SQLite, MariaDB - Python 3.7+ Tested with the following libraries: - Django Rest Framework - django-reversion & django-reversion-compare - django-filters Pros: Battletested in production - Aristotle Metadata built, support and uses this library for 2 separate products, served to government and enterprise clients! Fetching all translations for a model requires a single query Translations are stored in a single database field with the model All translations act like a regular field, so Model.field name = \"some string\" and print(Model.field name) work as you would expect Includes a configurable middleware that can set the current language context based on users cookies, query string or HTTP headers Works nicely with Django Rest Framework - translatable fields can be set as strings or as json dictionaries Works nicely with Django F() and Q() objects within the ORM - and when it doesn't we have a language aware LangF() replacement you can use. Cons: You need to alter the models, so you can't make third-party libraries translatable. I","default_branch":null,"files":null,"tree":[],"storefront":"/r/Aristotle-Metadata-Enterprises","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Aristotle-Metadata-Enterprises/django-garnett/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}