Add support for locale in template rendering