Help Center

Powered by Minitek FAQ Book
Loading...

Translate email templates

KB
Kim BorgenPosted 1 year agoEdited 1 year ago

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. 

Loading...
0
#3445

16 answers

M
MinitekPosted 1 year agoModerator

Hi there,

You must create new email templates for your language.


  1. Go to Dashboard > Default email templates
  2. Click on New
  3. Fill in all required fields
  4. 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

KB
Kim BorgenPosted 1 year agoEdited 1 year ago

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.

M
MinitekPosted 1 year agoModerator

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

M
MinitekPosted 1 year agoModerator

If you don't need multiple languages, then you can just edit the existing email templates.

KB
Kim BorgenPosted 1 year ago

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 ....

M
MinitekPosted 1 year agoModerator

Yes, that would be bad practice.

Thankfully, it does not work like that and they are not overwritten when the component is updated.

KB
Kim BorgenPosted 1 year ago

OK, I'll overwrite the originals then. Many thanks.

KB
Kim BorgenPosted 1 year ago

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>

M
MinitekPosted 1 year agoModerator

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.

KB
Kim BorgenPosted 1 year ago

I just did.

M
MinitekPosted 1 year agoModerator

Please also make sure that there are no forward slashes in the href attributes in the links.

KB
Kim BorgenPosted 1 year agoEdited 1 year ago

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.

KB
Kim BorgenPosted 1 year agoEdited 1 year ago

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?

M
MinitekPosted 1 year agoModerator

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.

M
MinitekPosted 1 year agoModerator

Attachment

KB
Kim BorgenPosted 1 year ago

Thanks.