diff options
author | Randy Bertram <rbertram@us.ibm.com> | 2014-09-09 17:28:17 -0400 |
---|---|---|
committer | Randy Bertram <rbertram@us.ibm.com> | 2014-09-23 14:24:48 +0000 |
commit | 78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0 (patch) | |
tree | 6d6938af5f788c1f7c6b49b581940e3e5ea46589 /horizon/templates/horizon/_scripts.html | |
parent | e0e46374de3ff041ba0bbde81eaabe7563792186 (diff) | |
download | horizon-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.html | 6 |
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> |