views:

61

answers:

1

I am trying out Django 1.2's spiffy new localization feature.

settings.py

    USE_L10N = True
    LANGUAGE_CODE = 'sv-SE'

sometemplate.html

    {{32.519823}}

Is rendered as: 32.519823

In Sweden, the decimal separator should be (, comma) not (. period). Am I missing something?

A: 

In answer to my own question, it's because DECIMAL_SEPARATOR is defined as '.' in formats.py for the sv locale (incorrectly, IMHO).

To solve this I overrided FORMAT_MODULE_PATH using this reference. Thanks to Brandon in #django for helping me.

pojo