Questions tagged [django-modeltranslation]

The modeltranslation application is used to translate dynamic content of existing Django models to an arbitrary number of languages without having to change the original model classes.

According to official documentation.

Modeltranslation uses a registration approach (comparable to Django’s admin app) to be able to add translations to existing or new projects and is fully integrated into the Django admin backend.

The advantage of a registration approach is the ability to add translations to models on a per-app basis. You can use the same app in different projects, may they use translations or not, and you never have to touch the original model class.

Features

  • Add translations without changing existing models or views
  • Translation fields are stored in the same table (no expensive joins)
  • Supports inherited models (abstract and multi-table inheritance)
  • Handle more than just text fields
  • Django admin integration
  • Flexible fallbacks, auto-population and more!
95 questions
0
votes
1 answer

How to rename translation fields in django

I have fields in model.py namely name,city which are registered with translation.So automatically two fields name_en and name_he are created in database. I want these fields to display as name_english and name_hebrew in admin portal of django. In my…
0
votes
1 answer

How to combine django-modeltranslation and django-reversion apps?

Question: how to combine django-modeltranslation and django-reversion apps? I have next problem: in models.py file I registered Slide model which has head field. This field has several other fields for translation like head_ru, head_kz, head_en. I…
0
votes
1 answer

Mezzanine 4.2.2 / 4.2.3: Search breaks when USE_MODELTRANSLATION = True

I've been having quite the time trying to get my search functionality to work correctly on my mezzanine project using django-modeltranslation. I am fairly new to Django, Mezzanine, and Python as well so no surprise as to why I'm having difficulty…
BugZap
  • 86
  • 4
0
votes
1 answer

django-modeltranslation removes text from models

This is my translation.py file: from modeltranslation.translator import translator, TranslationOptions from polls.models import Question, Choice class QuestionTranlationOptions(TranslationOptions): fields = ('question_text',) class…
0
votes
2 answers

How to change language in django-modeltranslation in function

I am using django-modeltranslation for translation some fields in my models. The package works great, everything is translated. But there is no easy method to switch language manually. From reading Accessing Translated and Translation…
vishes_shell
  • 22,409
  • 6
  • 71
  • 81
0
votes
1 answer

Django url slugs with modeltranslation NoReverseMatch Error

I am using modeltranslation in my project, and my goal is to also translate the slugs of my urls. The slugs are successfully translated and I overwrote the save method of my Model to automatically populate the slug fields for all the languages in…
0
votes
0 answers

Automatically translate model data according language

It is possible dynamically translate model data .I'm using Django 1.10 and modeltranslation 0.12.
Vinod Chahar
  • 41
  • 1
  • 4
0
votes
1 answer

Django,django-modeltranslation

I'm new with modeltranslation and I have a problem. When I do the manage.py makemigrations myapp command after creating my model and registering the fields to translate in translation.py the modeltranslation app doesn't add the translated field to…
Vinod Chahar
  • 41
  • 1
  • 4
0
votes
0 answers

Model to Model Transformation Techniques or Design Pattern in c#

I have come across a requirement where I need to come up with a Generic framework for transforming one Model to another Model and it should work for any model to any model transformation. So, It will have input model type and output model type. I…
Yogesh
  • 3,044
  • 8
  • 33
  • 60
0
votes
0 answers

How to get access to Django modeltranslation fields in Template?

I can't get access to only Django Translated fields in Template, it's displayed whenever if it returns Null in Template. Here is example of my template code: {% for book in books %}
A'zam Mamatmurodov
  • 370
  • 1
  • 5
  • 14
0
votes
1 answer

OperationalError at /admin/translation_manager/translationentry/ no such column: TRUE

I am using django-modeltranslation for multi languages option in my django application. I followed the instruction given in documentation. But frm admin whe I take "Translation entries" I gett an error saying OperationalError at…
Nija
  • 21
  • 1
  • 1
  • 3
0
votes
2 answers

Django admin filter urls for not-equals

I've created a custom FieldListFilter for my site's admin for whether modeltranslation translations are available for a field. It creates a filter that currently looks like this on the sidebar: The "Lacks English" option adds vt_title_en__exact= to…
yairchu
  • 23,680
  • 7
  • 69
  • 109
0
votes
1 answer

django model translation - returning the wrong language content

I am using this model-translation package everything works fine now in admin, i created an object in admin with english content. and my page is actually in german. .. e.g. starts with /de/blabla/. then I opened the page which should render all…
doniyor
  • 36,596
  • 57
  • 175
  • 260
0
votes
1 answer

Virtualenv and import six module erro in django 1.4

We install virtualenv inside every project in server: virtualenv env source env/bin/activate pip install -r requirements.txt But I have stil from django.utils.six import with_metaclass ImportError: No module named six error in syncdb. I have this…
TheNone
  • 5,684
  • 13
  • 57
  • 98
0
votes
1 answer

Django modeltranslation: don't show items which don't have translations

I want to show only the items which have translations into a language, when this language is active. At the moment untranslated items are shown too. Is there such setting in django-modeltranslation or do I have to write something myself?
maremare
  • 414
  • 1
  • 4
  • 19