Translate email templates
I want to make a new set of email templates (not custom) in my own language. Cant figure out where these are templates are located. None that I can see in any language folder. I'm not talking about a mulitlangual site, so I'm just looking to replace the english ones. Reason I dont want to edit these, is of course that those edits will be lost in a future component update. Any help appreciated.
16 answers
Hi there,
You must create new email templates for your language.
- Go to Dashboard > Default email templates
- Click on New
- Fill in all required fields
- Select your language in the field Language
Default email templates are automatically assigned to a notification event according to the notification event type and language. For example, if you have created a notification event for an article that is available only in english (en-GB), then the email template of that specific language (en-GB) will be assigned automatically to that notification event.
If an email template for a particular language does not exist, then the email template with language All will be used by default.
https://www.minitek.gr/support/documentation/joomla/content-notifications/email-templates
But I have no language field to fill in when entering a new email template. I have the fields title, email subject, type, status, and email body. Thats it.
That's probably because you have not configured your website for multiple languages.
https://www.joomlart.com/blog/how-to-create-a-multilingual-website-in-joomla-4-step-by-step-tutorial
If you don't need multiple languages, then you can just edit the existing email templates.
So I have no use for multiple languages. And, as I said, edits in the existing templates might be overwritten when a newer version is installed. So thats bad practice in my book ....
Yes, that would be bad practice.
Thankfully, it does not work like that and they are not overwritten when the component is updated.
OK, I'll overwrite the originals then. Many thanks.
Sorry to reopen this. But my email templates for new or updated content does not give an active URL (meanig a click on the artivle title does not lead to anything).
Maybe I've messed something up when translating? I dont think so, but could you please check if the code is valid (this is the mail for a new article):
<div style="background-color: #f0f0f0; padding: 10px; text-align: left;">
<div style="background-color: #f9f9f9; padding: 10px 15px;">Hei, [RECIPIENT_NAME].<br /><br /> En ny artikkel har blitt postet av [AUTHOR_NAME] på [SITE_NAME]:<br /><br />
<div style="background: #fff; padding: 15px; border: 1px solid #999;">
<div><a href="/[OBJECT_URL]" target="_blank" style="font-weight: bold;">[OBJECT_TITLE]</a> [OBJECT_URL]</div>
</div>
<div style="text-align: center; padding: 10px 0 0;"><small><a href="/[UNSUBSCRIBE_URL]" target="_blank">Avmeld</a></small></div>
</div>
</div>
Can you please forward me one of those emails? (at info@minitek.gr)
I see that there is a forward slash in the urls:
href="/[OBJECT_URL]"
href="/[UNSUBSCRIBE_URL]"
The forward slash may create the issue.
I just did.
Please also make sure that there are no forward slashes in the href attributes in the links.
Could you please paste in the original code here, so that I can make sure I have the exact same code?
I'd like to see both malesd, both new ande updated article.
To get the original email template code, I downoladed the component and unzipped files. But I cant seem to find these templates (don't know their location). Could you point me in the right direction og paste the code here?
You can find the html code for the original email templates in the attached archive.
You can also find the html codes in the file /administrator/components/com_contentnotifications/sql/install.mysql.utf8.sql
, starting at line 89.
Attachment
Thanks.