Added a 'locale' switch to templates.

This allows you to switch, within a template, between using commas or
points as the decimal separator, if your localisation is one that uses
commas.