Questions related to the package django-translated-fields.
Questions tagged [django-translated-fields]
15 questions
2
votes
0 answers
Translating words in array in javascript file in django
I installed the JavaScript Catalog for translating text in javascript files as explained in the docs: https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#module-django.views.i18n
That works well. I can create the PO translation files and…

shadow
- 151
- 2
- 12
2
votes
4 answers
Is there a way to define fields dynamically, but not as the last field?
I have a ModelForm with Django 2.1, and I moved a few fields to another model. Calling make_migrations causes an error because these fields don't exist in the current model. I added some of the fields to the form, but one of the fields is a…

Uri
- 2,992
- 8
- 43
- 86
1
vote
0 answers
How do I properly setup Django translations?
When I try to py manage.py makemessages --all,I get this:
File "\", line 1206, in \_gcd_import
File "\", line 1178, in \_find_and_load
File "\", line 1149,…

Rodney Shen
- 11
- 1
0
votes
0 answers
django translate model field that takes variable
stackoverflow society. I am working on django project where i need translation. But I could not translate the variable model field (testing_name) that is generated from other fields of form. Below are respective snippets:
Model:
class…

Togrul Kazimov
- 1
- 1
0
votes
1 answer
Why django translations don't work in celery task
I'm having problems with django text translations. My translation works fine in serializer, not in celery task.
I have one "Person" model. There are 3 fields in the Person model. One of the fields is gender. The genders are defined in the "enums.py"…

erhan
- 69
- 2
- 8
0
votes
0 answers
Django translation flags
I am trying to show flags using django-translation-flags in my app but this is showing me both languages' flags. How to configure this app so it shows only active language.
{% load i18n flags %}
{%…

Muhammad Koziev
- 51
- 1
- 5
0
votes
1 answer
Translate Django group name
I am creating a Django application where users will have different possible groups to manage their permissions.
I would like this application to be translatable in the future, but the group names are not translatable by default. How can I make this…

Raida
- 1,206
- 5
- 17
0
votes
0 answers
How to show Language code in field label in Django translated fields
i used django translated fields to create some monolingual fields in my models.
It works good, but in admin page, in add page, there is two same fields for every translated fields i created.
How can i show language code for each field?
What it is…

Erfan Saberi
- 134
- 8
0
votes
1 answer
How to translate inline javascript?
So I'm working on a django project and we're having English translated to Czech (not important). I can do fine with regular tags being translated with {% trans 'sample text' %}
However, I have a button inside a link and on click, this link returns a…

Jasasul
- 5
- 3
0
votes
0 answers
Django translate data from the DB {{ profession }}
Is it possible to translate DB entries? I have a dependent dropdown story that i need to translate. But i cant translate the dropdown fields, the fields come from other models and har hard coded. I can use HTML with JQ to achive this but i want to…

The
- 73
- 7
0
votes
0 answers
Django {% trans %} not translating new changes
I am trying to run a web-app locally (forked from here ) . I am using the {% trans %} tag to mark strings to be translated.
The original piece of code was
Personal data
. However , when I change it to{% trans "Personal data" %}
,…
extra123
- 13
- 4
0
votes
2 answers
Django model field contain strange attribute _("private")
Currently I have been learning Django and while reading, I have come across the below code block which I don't understand.
private = models.BooleanField(
_('private'),
default=False,
help_text=_('theme is available ONLY for…

Moon
- 4,014
- 3
- 30
- 66
0
votes
1 answer
Django Parler "The 'language_code' attribute cannot be changed directly
I am currently extending a plugin to play well with Django translations and languages. Here is the method in question. Prior to getting translations involved, it worked as needed.
I extended the query to pull data from a couple of translation…

MadPhysicist
- 5,401
- 11
- 42
- 107
0
votes
2 answers
Multilingual slug with django-translated-fields
I am trying to implement a multilingual Django website with help of django-translated-fields.
The project I am working on is based on cookiecutter-django and Docker.
The translation works fine for my model fields – except the slug filed. Actually…

Philipp
- 794
- 1
- 7
- 21
0
votes
1 answer
Using forms with django-translated-fields
Please take a look at this issue:
How do I use ModelForm with django-translated-fields?
Do you have any solution?
In short, I'm trying to convert Speedy Net from using django-modeltranslation to django-translated-fields. I defined the models and…

Uri
- 2,992
- 8
- 43
- 86