jinja2.ext.InternationalizationExtension.preprocess

InternationalizationExtension.preprocess(source, name, filename=None)

This method is called before the actual lexing and can be used to preprocess the source. The filename is optional. The return value must be the preprocessed source.