fixed localization support in templates