- The input Mustache template is parsed to separate the literal text from the Mustache tags.
- The template is modified to replace all Mustache tags with placeholder XML tags. Unique IDs are attached to each placeholder tag to identify them in the translated XML.
- The XML template is translated using DeepL API with XML tag handling activated.
- The translated XML is parsed to identify placeholder tags and replace them with the original Mustache tags.