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

Does django-ckeditor works with django-modeltranslation

I use django-modeltranslation to translate some text fields into several languagues. This works well. Now I want to implement django-ckeditor and this is working for not translated field as well. Problem is with fields which is translated (this…
Alex B.
  • 23
  • 3
0
votes
1 answer

No "Copy content from" wagtail-modeltranslation button

The "COPY CONTENT FROM [available translation languages]" button is not showing in the admin page editing interface. The package was installed properly, following official documentation. What can cause the issue and how to fix it?
0
votes
1 answer

Django ModelTranslation

Hello guys i need a help for translating models values. I use django-modeltranslation package. I have managed to register my models. class Institution(models.Model): title = models.CharField(_('Title'),max_length = 200) address =…
0
votes
1 answer

Wagtail modeltranslation doesn't work with DEBUG = False

I have a problem with absent redirection to the default language for the multilanguage wagtail site. If I set DEBUG = False on production, I got Internal server error, because redirection to url with language postfix is absent. If DEBUG = True…
Anton Aks
  • 11
  • 3
0
votes
1 answer

Django activate translations project wide instead of per view?

I have a Django project where I activate the translations based on the Accept-Language header on each and every view as follows, from django.utils import translation translation.activate(request.headers.get('Accept-Language', 'en')) So if I have a…
0
votes
1 answer

How to add translation fields to templates using django-modeltranslation?

I am trying to translate my webpage using django-modeltranslation. I have complete the setup with the help of documentation provided but I am facing problem to display the model translated fields to templates. Can you help? Here is what I have…
0
votes
1 answer

When I change the language of the website, the slug is not translated causing a 404 error

I'm new programming with Django. I'm currently using version 2.2 for my first project. So far it's going well, my website consists of a landing page with a product catalog which has to work in two languages: English and Spanish. My problem is that…
0
votes
1 answer

Django modeltranslation for AJAX request

I have installed the Django modeltranslation package and almost everything works fine... The only thing that doesn't are the AJAX requests, whose JsonResponses are still coming back in the original language. I couldn't find in the docs how to fix…
Original BBQ Sauce
  • 527
  • 1
  • 11
  • 24
0
votes
1 answer

How to auto-translate other-languages fiels using django-modeltranslation

Is there any way in which the other-languages fields can be auto-translated Like in this picture I want to auto-translate the Name[pt] , Body[pt] fields by seeing the (en)-fields.
SUMIT KUMAR
  • 153
  • 1
  • 1
  • 10
0
votes
1 answer

Django Admin Classes that Override formfield_for_dbfield - Error

I have a bunch of FlatPages on my django website and would like to translate their content in different languages from the Admin using the django-modeltranslations pacakge. Here is my code: class TinyMCEFlatPageAdmin(FlatPageAdmin): def…
AntoG
  • 833
  • 1
  • 10
  • 16
0
votes
0 answers

django-modeltranslation - Django model get() SQL SELECT does not fetch translated fields

I use django-modeltranslation to translate some model fields to Dutch (nl) and French (fr). Now, all has been working fine except for one model: @register(Association) class AssociationTranslationOptions(TranslationOptions): fields = ( …
0
votes
1 answer

default language value overrides translation field in admin

I am using Django model translation for the multi-linguistic site(English(default), Arabic, French), the problem is when saving data in django admin default overrides both Arabic and French translation fields. But in database actual value…
0
votes
1 answer

Reflection/Lookup on Django model doesn't find internationalized (shadow) fields

I use a CMS that does a mapping of my models through an API at runtime. It works fine, except for localized fields, because I use https://django-modeltranslation.readthedocs.io/en/latest/registration.html which add "shadow" fields that are obviously…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
0
votes
1 answer

Django 'title_en' is not in list

Request Method: GET Request URL: http://localhost:8000/blog/blog-title/ Django Version: 1.10.8 Exception Type: ValueError Exception Value: 'title_en' is not in list Exception Location: /lib/python3.6/site-packages/django/db/models/query.py in…
0
votes
1 answer

django-modeltranslation causes django unable to access database

I have a django rest framework project already going with some models already created, and I am trying to add django-modeltranslation to the project. I followed the process as specified in django-modeltranslation documentation, but applications stop…
HuLu ViCa
  • 5,077
  • 10
  • 43
  • 93