Hi Antonis,
-- I think I figured this out. I have English as fallback language (LANGUAGE_CODE = 'en') in the settings, but my source language is German, and this mismatch seems to have been the source of all the trouble. Providing German translations (even if the original strings are already in German) seems to solve the issue.
Thanks for your help in any case,
Joan
On Thursday, March 9, 2017 at 10:51:11 AM UTC+1, Antonis Christofides wrote:
On Thursday, March 9, 2017 at 10:51:11 AM UTC+1, Antonis Christofides wrote:
It's very unlikely that such a basic behaviour won't work, so probably you are doing something wrong (and so's the stack overflow poster). I made several related changes in an app yesterday and I had absolutely no problem with {% trans %} (but I'm using 1.8).
Do you have USE_I18N = True?
If in the template you use
{% get_current_language as current_language %}
<p>{{ current_language }}</p>does it show the correct language?
Antonis Christofides http://djangodeployment.comOn 03/09/2017 11:25 AM, Joan Perals wrote:
This post on StackOverflow seems to report the same behaviour:--
It's quite old (almost 5 years), but remains unresolved.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/02a7eb4a- .086f-4e76-a693-3ae5623db08e% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ce0215f5-9972-453e-9b6c-37bdcf3e66e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment