diff --git a/dynamicweb/formats/__init__.py b/dynamicweb/formats/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/dynamicweb/formats/de/__init__.py b/dynamicweb/formats/de/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/dynamicweb/formats/de/formats.py b/dynamicweb/formats/de/formats.py new file mode 100644 index 00000000..c1f28af7 --- /dev/null +++ b/dynamicweb/formats/de/formats.py @@ -0,0 +1,2 @@ +DECIMAL_SEPARATOR = '.' +THOUSAND_SEPARATOR = ',' diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 19037a75..ae6f8132 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -255,6 +255,12 @@ USE_L10N = True USE_TZ = True +USE_THOUSAND_SEPARATOR = True + +FORMAT_MODULE_PATH = [ + 'dynamicweb.formats' +] + LANGUAGES = ( ('en-us', _('English')), ('de', _('Deutsch')), @@ -262,11 +268,6 @@ LANGUAGES = ( LANGUAGE_CODE = 'en-us' -LOCALE_PATHS = [ - - os.path.join(PROJECT_DIR, 'digitalglarus/locale'), -] - CMS_PLACEHOLDER_CONF = { 'logo_image': { 'name': 'Logo Image', diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index d747979d..e0e85cfd 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -30,7 +30,7 @@ {{ order.id }} {{ order.created_at | date:"M d, Y H:i" }} - {{ order.price|unlocalize }} + {{ order.price }} {% trans 'See Invoice' %} diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html index 467d9d39..ce1656ae 100644 --- a/hosting/templates/hosting/virtual_machines.html +++ b/hosting/templates/hosting/virtual_machines.html @@ -1,5 +1,5 @@ {% extends "hosting/base_short.html" %} -{% load staticfiles bootstrap3 i18n %} +{% load staticfiles bootstrap3 i18n l10n %} {% block content %}
@@ -40,7 +40,7 @@ {% for vm in vms %} - {{vm.vm_id}} + {{vm.vm_id|unlocalize}} {% if vm.ipv4 %}{{vm.ipv4}}{% endif %} {% if vm.ipv6 %}{{vm.ipv6}}{% endif %}