how to resolve the problem gettext is not defined.
an example base template file
<htmllang='zh-TW'><head><metacharset="UTF-8"><metahttp-equiv="content-type" content="text/html;charset=UTF-8"><metaname="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1.0, width=device-width, height=device-height " /><metahttp-equiv="X-UA-Compatible" content="IE=edge"><scripttype="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
{% block extra_content %} {% endblock %} {% block js %} {% endblock %}
</head><body><divid="now_lang" style="display: none">{{ LANG }}</div>
{% csrf_token %}
{% block content %}{% endblock %}
</body></html>by add this <script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>, I can call gettext in my jsx file. However, the render server will not know what gettext is.
Is there any solution for this situation ?
how to resolve the problem gettext is not defined.
an example base template file
by add this
<script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>, I can callgettextin my jsx file. However, the render server will not know whatgettextis.Is there any solution for this situation ?