summaryrefslogtreecommitdiff
path: root/horizon/templates/horizon/_scripts.html
diff options
context:
space:
mode:
authorRandy Bertram <rbertram@us.ibm.com>2014-09-09 17:28:17 -0400
committerRandy Bertram <rbertram@us.ibm.com>2014-09-23 14:24:48 +0000
commit78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0 (patch)
tree6d6938af5f788c1f7c6b49b581940e3e5ea46589 /horizon/templates/horizon/_scripts.html
parente0e46374de3ff041ba0bbde81eaabe7563792186 (diff)
downloadhorizon-78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0.tar.gz
Datepicker locale support
Also adds general language info to the horizon JS object. Change-Id: I8fbf20635ac0a2ae1f3b8f618ce5a37eb53e9cc0 Closes-Bug: 1274145
Diffstat (limited to 'horizon/templates/horizon/_scripts.html')
-rw-r--r--horizon/templates/horizon/_scripts.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/horizon/templates/horizon/_scripts.html b/horizon/templates/horizon/_scripts.html
index bd87edebd..3e3ec4fbb 100644
--- a/horizon/templates/horizon/_scripts.html
+++ b/horizon/templates/horizon/_scripts.html
@@ -1,5 +1,8 @@
{% load compress %}
{% load url from future %}
+{% load datepicker_locale from horizon %}
+
+{% datepicker_locale as DATEPICKER_LOCALE %}
{% comment %} Django's JavaScript i18n Implementation {% endcomment %}
<script type="text/javascript" src="{% url 'horizon:jsi18n' 'horizon' %}"></script>
@@ -29,6 +32,9 @@
<script src="{{ STATIC_URL }}bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
<script src='{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/bootstrap-datepicker.js' type='text/javascript' charset='utf-8'></script>
+{% ifnotequal DATEPICKER_LOCALE 'en' %}
+<script src='{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/locales/bootstrap-datepicker.{{ DATEPICKER_LOCALE }}.js' type='text/javascript' charset='utf-8'></script>
+{% endifnotequal %}
<script src="{{ STATIC_URL }}horizon/lib/hogan.js" type="text/javascript" charset='utf-8'></script>