Template tags

statici18n

templatetags.statici18n.statici18n(locale)

Builds the full JavaScript catalog URL for the given locale by joining the STATICI18N_OUTPUT_DIR and STATICI18N_FILENAME_FUNCTION settings:

{% load statici18n %}
<script src="{% statici18n LANGUAGE_CODE %}"></script>

This is especially useful when using a non-local storage backend to deploy files to a CDN or when using CachedStaticFilesStorage storage to serve files.

Note

Behind the scenes, it’s a thin wrapper around the static template tag. Therefore, ensure that django.contrib.staticfiles is configured before proceeding. See How to configure static files with django-statici18n? for more information.