Anyone please help me to write a code for a custom html inside Print Format that how can I make it functional with Custom Translation? or are there any solutions defining some rules or conditions inside a Jinja tag to detect a print format’s language?
For example : If the print format’s language is chosen “en-uk”, the custom html displays “Analyse”. Or when the language is “en-us”, the custom html displays “Analyze”.
If I understand your issue correctly, you can make any word translatable in a custom print format by using the following template: {{ _(“word”) }}
The translation will then be applied based on the translated words already available in Frappe/ERPNext or on the custom translation you define in your site.
The selected language depends on the form’s language (selectable in the print options for an invoice for example) or on the system language.
Does this also work in Email Templates (e.g. the one to be sent when resetting the password)
I have something as below in my html template:
<div class="content">
<p>{{ _("Dear") }} {{ first_name }}{% if last_name %} {{ last_name }}{% endif %},</p>
<p>{{ _("Please click on the following link to set your new password") }}:</p>
<p><a class="button" href="{{ link }}">{{ _("Reset your password") }}</a></p>
<p>{{ _("Once the password has been reset, you may enter into the portal.") }}</p>
<p>{{ _("Thank you") }}</p>
</div>
Does it mean that then I need a Translation per each of the HTML tags? Including the HTML tags as well?