Compatibility issue with django-parler
sunjoomoon opened this issue · 3 comments
When using both django-solo and https://github.com/edoburu/django-parler, in admin screen all go blank - nothing is shown. But if used without django-parler, all work fine. In fact I have been using django-solor with modeltranslations for multiplanguage, have had no issues with django-solo and modeltranslations.
What should I look into?
Hi and thanks for the comment.
It would be interesting to see the error messages you get. May be there is a legitimate error - I have not tested django-parler before...
Error is django-parler/django-parler#127
Further testing showed.
- display out confused with language.
- Three languages, English Korean and Chinese simplified tested now. Wrong translations displayed. For example Korean shows English or Chinese shows English randomly.
- My guess initially was cache but even after cache clear the same issue
- now no erros returned, just confused language display.
What should look into?
Stupid of me... Sorry for the buzz. It was all about cache ! After disabling cache, all work fine. FYI, I use below language change
{# ---------------------------------------------------------------------- #}
<ul class="select-language">
{% for lang_code, title in LANGUAGES %}
{% get_language_info for lang_code as lang %}
{% get_translated_url lang_code as tr_url %}
{% if tr_url %}<li{% if lang_code == LANGUAGE_CODE %} class="is-selected"{% endif %}><a href="{{ tr_url }}" hreflang="{{ lang_code }}">{{ lang.name_local|capfirst }}</a></li>{% endif %}
{% endfor %}
</ul>
{# ---------------------------------------------------------------------- #}
Perhaps, any work around to use both cache
and change language ?