How to translate custom print format?

Hello,
I want to make both fields and their values translatable in a custom print format.
Does anyone have an idea?

I know this answer is very late, but maybe helping others how find the question. If anybody has a better option tell me
I did it with Jinja2 ( not me but ChatGPT) This particular code grabs the language of the supplier and makes the translation directly in the custom HTML.

The second image shows where the print language is defined.

I’m not a programmer, only a googler and since recently a ChatGPTler (time passes quickly, so not reall recently I used it almost from the beginning)

{% if doc.contact_display or doc.contact_mobile or doc.contact_email %}
    <div class="contact-details">

        <span class="title">
            {% if doc.language == "de" %}
                Kontaktdaten
            {% else %}
                Contact Details
            {% endif %}
        </span>
        
        {% if doc.contact_display %}
            <!-- Contact Name -->
            <span>{{ doc.contact_display }}</span> <br>
        {% endif %}

        {% if doc.contact_mobile %}
            <!-- Contact Mobile No -->
            <span>{{ doc.contact_mobile }}</span><br>
        {% endif %}

        {% if doc.contact_email %}
            <!-- Contact Email -->
            <span>{{ doc.contact_email }}</span><br>
        {% endif %}
    </div>
{% endif %}