Email reminders language

Hi,

is there any way how to translate email reminders so that each client can get them in their own language, please? I currently need at least 2 languages.

Thanks.

If you reset the template to the defaults your clients should be sent emails in their own language.

Thanks for the answer.

That is a problem because the default translations are not sufficient.

Can I somehow edit all 4 email reminder templates in translation files for each language (incl. formatting and variables) and then reset to the default as mentioned above to archieve the desired look?

Btw. I pressume that Invoice email templates are the same case? I also need to send them in at least 2 predefined templates according to the client`s language (incl. reccuring invoices). If there is a way to translate it using language files and to preserve formatting + variables that would be great.

You could update the language files but you’d need to reapply the changes when updating the app.

https://github.com/invoiceninja/invoiceninja/tree/master/resources/lang

Thanks for the answer.

I am looking at those translations in texts.php and it seems that Invoice email template (= new invoice email) is using the same text as Reminders (= reminder emails).

'invoice_message' => 'To view your invoice for :amount, click the link below.',

I need to have the reminder with different texts than the “new invoice email”. Is there any way how to archieve that, please? Perhaps I am missing something?

Thanks.

You need to change the file in the folder with the same language as the client’s language.

I understand that part, but as mentioned above. My question is whether “new invoice” emails and “reminder” emails dont have the same default text. If yes then this will not work for me, because I need to have different text for new invoices and reminders.

If you modify the language files I believe that can be accomplished.

I think that I know what confused me.

There are two translations containing relevant text:
‘invoice_message’ = new invoices
‘invoice_message_button’ = reminders

The problem I face now is that when I edit the default text everything is formatted as expected (using HTML in the php file), but for some reason it still shows $client, $emailSignature and $viewButton variables even when I do not have such variables in the new modified default text now.

I guess that I will also need to edit some php files from the app itself then?

Here’s the relevant code:

https://github.com/invoiceninja/invoiceninja/blob/master/app/Models/Traits/SendsEmails.php

Thank you! That worked.

I am having one more problem with the subject. I need to have 3 different subjects for my first, second and third reminder, but there seems to be only one configurable text:
'reminder_subject'

I have run into another huge problem. I was kind of worried that both new invoices and reminders are linked to the same default text. Now I am affraid that my original assumption was correct.

Both of them are using the following default text after the reset:
‘invoice_message_button’

I therefore can not make any reminder template language related changes because it will automatically affect email template for new invoices (e.g. I will be telling the customer that his invoice was not paid. But during the new invoice creation that of course does not make any sense).

Perhaps this can be archieved with a few PHP changes?

I think that it might be a bug, because ‘invoice_subject’ is different than the one used for reminders.

If you make code changes anything is possible, changing the language files has limitations.

I thought that I will be able to archieve two different email templates for reminders which is possible, but it will also break the template for new invoices. Not sure how to change the code to have both working at the same time since I am not familiar with the app (and Symfony) that much. Hopefuly this bug will be fixed in one of the next versions of the app. Thanks for the help!